cc_project_template_cmake

A cmake, ninja, and googletest-based C++ project template
git clone https://git.bracken.jp/cc_project_template_cmake.git
Log | Files | Refs | Submodules | README | LICENSE

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