problemscpp
A collection of my answers to algorithm problems in c++.
| 函数
leetcode::binary_number_with_alternating_bits 命名空间参考

  1. Binary Number with Alternating Bits
更多...

class  Solution
 

函数

 TEST (binary_number_with_alternating_bits, case1)
 
 TEST (binary_number_with_alternating_bits, case2)
 
 TEST (binary_number_with_alternating_bits, case3)
 

详细描述

  1. Binary Number with Alternating Bits

函数说明

◆ TEST() [1/3]

leetcode::binary_number_with_alternating_bits::TEST ( binary_number_with_alternating_bits  ,
case1   
)

在文件 leetcode_test.cpp2523 行定义.

2523 {
2524 ASSERT_TRUE(Solution::hasAlternatingBits(5));
2525 }

引用了 leetcode::binary_number_with_alternating_bits::Solution::hasAlternatingBits().

◆ TEST() [2/3]

leetcode::binary_number_with_alternating_bits::TEST ( binary_number_with_alternating_bits  ,
case2   
)

在文件 leetcode_test.cpp2527 行定义.

2527 {
2528 ASSERT_FALSE(Solution::hasAlternatingBits(7));
2529 }

引用了 leetcode::binary_number_with_alternating_bits::Solution::hasAlternatingBits().

◆ TEST() [3/3]

leetcode::binary_number_with_alternating_bits::TEST ( binary_number_with_alternating_bits  ,
case3   
)

在文件 leetcode_test.cpp2531 行定义.

2531 {
2532 ASSERT_FALSE(Solution::hasAlternatingBits(11));
2533 }

引用了 leetcode::binary_number_with_alternating_bits::Solution::hasAlternatingBits().