foo_test.cc (218B)
1 #include "foo.h" 2 3 #include "gtest/gtest.h" 4 5 TEST(Foo, IncrementsZero) { 6 EXPECT_EQ(1, Foo(0)); 7 } 8 9 TEST(Foo, IncrementsPositive) { 10 EXPECT_EQ(2, Foo(1)); 11 } 12 13 TEST(Foo, IncrementsNegative) { 14 EXPECT_EQ(-1, Foo(-2)); 15 }