proxygen
sample4_unittest.cc File Reference
#include "gtest/gtest.h"
#include "sample4.h"

Go to the source code of this file.

Functions

 TEST (Counter, Increment)
 

Function Documentation

TEST ( Counter  ,
Increment   
)

Definition at line 36 of file sample4_unittest.cc.

References c, EXPECT_EQ, and Counter::Increment().

36  {
37  Counter c;
38 
39  // EXPECT_EQ() evaluates its arguments exactly once, so they
40  // can have side effects.
41 
42  EXPECT_EQ(0, c.Increment());
43  EXPECT_EQ(1, c.Increment());
44  EXPECT_EQ(2, c.Increment());
45 }
int Increment()
Definition: sample4.cc:39
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
char c