cc_project_template_bazel

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

foo_test.cc (284B)


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