about summary refs log tree commit diff
path: root/library/std/src/num/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/num/tests.rs')
-rw-r--r--library/std/src/num/tests.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/num/tests.rs b/library/std/src/num/tests.rs
index 2f50b73f490..df0df3f23f7 100644
--- a/library/std/src/num/tests.rs
+++ b/library/std/src/num/tests.rs
@@ -75,8 +75,8 @@ fn test_checked_mul() {
 
 macro_rules! test_is_power_of_two {
     ($test_name:ident, $T:ident) => {
+        #[test]
         fn $test_name() {
-            #![test]
             assert_eq!((0 as $T).is_power_of_two(), false);
             assert_eq!((1 as $T).is_power_of_two(), true);
             assert_eq!((2 as $T).is_power_of_two(), true);
@@ -96,8 +96,8 @@ test_is_power_of_two! { test_is_power_of_two_uint, usize }
 
 macro_rules! test_next_power_of_two {
     ($test_name:ident, $T:ident) => {
+        #[test]
         fn $test_name() {
-            #![test]
             assert_eq!((0 as $T).next_power_of_two(), 1);
             let mut next_power = 1;
             for i in 1 as $T..40 {
@@ -118,8 +118,8 @@ test_next_power_of_two! { test_next_power_of_two_uint, usize }
 
 macro_rules! test_checked_next_power_of_two {
     ($test_name:ident, $T:ident) => {
+        #[test]
         fn $test_name() {
-            #![test]
             assert_eq!((0 as $T).checked_next_power_of_two(), Some(1));
             let smax = $T::MAX >> 1;
             assert_eq!(smax.checked_next_power_of_two(), Some(smax + 1));