bar_test.cc (220B)
1 #include "bar.h" 2 3 #include "gtest/gtest.h" 4 5 TEST(Bar, DecrementsZero) { 6 EXPECT_EQ(-1, Bar(0)); 7 } 8 9 TEST(Bar, DecrementsPositive) { 10 EXPECT_EQ(1, Bar(2)); 11 } 12 13 TEST(Bar, DecrementsNegative) { 14 EXPECT_EQ(-2, Bar(-1)); 15 } 16