29 #include <gtest/gtest.h> 78 EXPECT_DEATH_IF_SUPPORTED(
floorLog2(0),
"x > 0");
T roundUp(const T &val, const U &align)
This function is used to align addresses in memory.
#define EXPECT_TRUE(expr)
A macro which verifies that expr evaluates to true.
std::enable_if< std::is_integral< T >::value, int >::type floorLog2(T x)
uint64_t power(uint32_t n, uint32_t e)
bool isPowerOf2(const T &n)
T roundDown(const T &val, const U &align)
This function is used to align addresses in memory.
#define EXPECT_FALSE(expr)
A macro which verifies that expr evaluates to false.
TEST(IntmathTest, isPowerOf2)
T divCeil(const T &a, const U &b)
#define EXPECT_EQ(lhs, rhs)
A macro which verifies that lhs and rhs are equal to each other.