#include #include #include "gtest/gtest.h" #include "../src/core/Tree.h" #include "../src/core/TreeNode.h" class TreeTest: public ::testing::Test { protected: virtual void SetUp(){ for(int i = 0; i < 5; ++i) { t2.getRoot()->addChildObject(std::make_shared("blah")); } } virtual void TearDown(){} Tree t; Tree t2; Tree t3; }; TEST_F(TreeTest, IsEmptyInitially) { EXPECT_EQ(0, t.getRoot()->getDistanceFromRoot()); EXPECT_EQ(0, t.getRoot()->getChildren().size()); } TEST_F(TreeTest, blah) { EXPECT_EQ(5, t2.getRoot()->getChildren().size()); auto last = t2.getRoot()->getChildren().back(); EXPECT_EQ(1, last->getDistanceFromRoot()); } TEST(sample_test_case, sample_test) { EXPECT_EQ(1, 1); }