@@ -26,26 +26,26 @@ public void testIsPowerTwo(int number, boolean expected) {
26
26
}
27
27
28
28
private static Stream <Arguments > provideNumbersForPowerTwo () {
29
- return Stream .of (Arguments .of (1 , true ), // 2^0
30
- Arguments .of (2 , true ), // 2^1
31
- Arguments .of (4 , true ), // 2^2
32
- Arguments .of (8 , true ), // 2^3
33
- Arguments .of (16 , true ), // 2^4
34
- Arguments .of (32 , true ), // 2^5
35
- Arguments .of (64 , true ), // 2^6
36
- Arguments .of (128 , true ), // 2^7
37
- Arguments .of (256 , true ), // 2^8
38
- Arguments .of (1024 , true ), // 2^10
39
- Arguments .of (0 , false ), // 0 is not a power of two
40
- Arguments .of (-1 , false ), // Negative number
41
- Arguments .of (-2 , false ), // Negative number
42
- Arguments .of (-4 , false ), // Negative number
43
- Arguments .of (3 , false ), // 3 is not a power of two
44
- Arguments .of (5 , false ), // 5 is not a power of two
45
- Arguments .of (6 , false ), // 6 is not a power of two
46
- Arguments .of (15 , false ), // 15 is not a power of two
47
- Arguments .of (1000 , false ), // 1000 is not a power of two
48
- Arguments .of (1023 , false ) // 1023 is not a power of two
29
+ return Stream .of (Arguments .of (1 , Boolean . TRUE ), // 2^0
30
+ Arguments .of (2 , Boolean . TRUE ), // 2^1
31
+ Arguments .of (4 , Boolean . TRUE ), // 2^2
32
+ Arguments .of (8 , Boolean . TRUE ), // 2^3
33
+ Arguments .of (16 , Boolean . TRUE ), // 2^4
34
+ Arguments .of (32 , Boolean . TRUE ), // 2^5
35
+ Arguments .of (64 , Boolean . TRUE ), // 2^6
36
+ Arguments .of (128 , Boolean . TRUE ), // 2^7
37
+ Arguments .of (256 , Boolean . TRUE ), // 2^8
38
+ Arguments .of (1024 , Boolean . TRUE ), // 2^10
39
+ Arguments .of (0 , Boolean . FALSE ), // 0 is not a power of two
40
+ Arguments .of (-1 , Boolean . FALSE ), // Negative number
41
+ Arguments .of (-2 , Boolean . FALSE ), // Negative number
42
+ Arguments .of (-4 , Boolean . FALSE ), // Negative number
43
+ Arguments .of (3 , Boolean . FALSE ), // 3 is not a power of two
44
+ Arguments .of (5 , Boolean . FALSE ), // 5 is not a power of two
45
+ Arguments .of (6 , Boolean . FALSE ), // 6 is not a power of two
46
+ Arguments .of (15 , Boolean . FALSE ), // 15 is not a power of two
47
+ Arguments .of (1000 , Boolean . FALSE ), // 1000 is not a power of two
48
+ Arguments .of (1023 , Boolean . FALSE ) // 1023 is not a power of two
49
49
);
50
50
}
51
51
}
0 commit comments