File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,8 @@ fn test_checked_mul() {
75
75
76
76
macro_rules! test_is_power_of_two {
77
77
( $test_name: ident, $T: ident) => {
78
+ #[ test]
78
79
fn $test_name( ) {
79
- #![ test]
80
80
assert_eq!( ( 0 as $T) . is_power_of_two( ) , false ) ;
81
81
assert_eq!( ( 1 as $T) . is_power_of_two( ) , true ) ;
82
82
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 }
96
96
97
97
macro_rules! test_next_power_of_two {
98
98
( $test_name: ident, $T: ident) => {
99
+ #[ test]
99
100
fn $test_name( ) {
100
- #![ test]
101
101
assert_eq!( ( 0 as $T) . next_power_of_two( ) , 1 ) ;
102
102
let mut next_power = 1 ;
103
103
for i in 1 as $T..40 {
@@ -118,8 +118,8 @@ test_next_power_of_two! { test_next_power_of_two_uint, usize }
118
118
119
119
macro_rules! test_checked_next_power_of_two {
120
120
( $test_name: ident, $T: ident) => {
121
+ #[ test]
121
122
fn $test_name( ) {
122
- #![ test]
123
123
assert_eq!( ( 0 as $T) . checked_next_power_of_two( ) , Some ( 1 ) ) ;
124
124
let smax = $T:: MAX >> 1 ;
125
125
assert_eq!( smax. checked_next_power_of_two( ) , Some ( smax + 1 ) ) ;
You can’t perform that action at this time.
0 commit comments