integrate gtest framwork
This commit is contained in:
15
map/test/test_basic.cpp
Normal file
15
map/test/test_basic.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "map.hpp"
|
||||
|
||||
TEST(BasicTests, GTestItSelf) {
|
||||
// Expect two strings not to be equal.
|
||||
EXPECT_STRNE("hello", "world");
|
||||
// Expect equality.
|
||||
EXPECT_EQ(7 * 6, 42);
|
||||
}
|
||||
|
||||
TEST(BasicTests, ConstructorAndEmptySize) {
|
||||
sjtu::map<int, int> map;
|
||||
EXPECT_EQ(map.empty(), true);
|
||||
EXPECT_EQ(map.size(), 0);
|
||||
}
|
Reference in New Issue
Block a user