Skip to content

Commit

Permalink
[checkpoint] woops, we don't support gmock.h
Browse files Browse the repository at this point in the history
  • Loading branch information
mbs-octoml committed Sep 14, 2021
1 parent 7460dc2 commit 43d1584
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions tests/cpp/runtime/logging_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* under the License.
*/

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <tvm/runtime/logging.h>

Expand All @@ -28,26 +27,26 @@ namespace {

TEST(ParseTvmLogDebugSpec, Disabled) {
auto map = ParseTvmLogDebugSpec(nullptr);
EXPECT_THAT(map.size(), testing::Eq(0));
EXPECT_EQ(map.size(), 0);

map = ParseTvmLogDebugSpec("");
EXPECT_THAT(map.size(), testing::Eq(0));
EXPECT_EQ(map.size(), 0);

map = ParseTvmLogDebugSpec("0");
EXPECT_THAT(map.size(), testing::Eq(0));
EXPECT_EQ(map.size(), 0);

map = ParseTvmLogDebugSpec("1");
EXPECT_THAT(map.size(), testing::Eq(0));
EXPECT_EQ(map.size(), 0);
}

TEST(ParseTvmLogDebugSpec, SomeEnabled) {
auto map = ParseTvmLogDebugSpec("1;foo/bar.cc=3;baz.cc=-1;*=2;another/file.cc=4;");
EXPECT_THAT(map.size(), testing::Eq(4));
EXPECT_EQ(map.size(), 4);

EXPECT_THAT(map, testing::Contains(testing::Pair("*", 2)));
EXPECT_THAT(map, testing::Contains(testing::Pair("foo/bar.cc", 3)));
EXPECT_THAT(map, testing::Contains(testing::Pair("baz.cc", -1)));
EXPECT_THAT(map, testing::Contains(testing::Pair("another/file.cc", 4)));
EXPECT_EQ(map["*"], 2);
EXPECT_EQ(map["foo/bar.cc"], 3);
EXPECT_EQ(map["baz.cc"], -1);
EXPECT_EQ(map["another/file.cc"], 4);
}

TEST(ParseTvmLogDebugSpec, IllFormed) {
Expand Down

0 comments on commit 43d1584

Please sign in to comment.