memgraph/tests/unit/utils_math.cpp
Matej Ferencevic 0111fa506a Add logarithmic functions
Reviewers: mtomic, teon.banek

Reviewed By: mtomic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1811
2019-01-17 14:26:16 +01:00

13 lines
232 B
C++

#include <cmath>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "utils/math.hpp"
TEST(UtilsMath, Log2) {
for (uint64_t i = 1; i < 1000000; ++i) {
ASSERT_EQ(utils::Log2(i), static_cast<uint64_t>(log2(i)));
}
}