Home | History | Annotate | Download | only in samples

Lines Matching refs:TEST

35 // This sample shows how to write a simple unit test for a function,
38 // Writing a unit test using Google C++ testing framework is easy as 1-2-3:
42 // test logic needs is declared.
51 // Step 2. Use the TEST macro to define your tests.
53 // TEST has two parameters: the test case name and the test name.
54 // After using the macro, you should define your test logic between a
56 // success or failure of a test. EXPECT_TRUE and EXPECT_EQ are
61 // In Google Test, tests are grouped into test cases. This is how we
62 // keep test code organized. You should put logically related tests
63 // into the same test case.
65 // The test case name and the test name should both be valid C++
68 // Google Test guarantees that each test you define is run exactly
79 TEST(FactorialTest, Negative) {
80 // This test is named "Negative", and belongs to the "FactorialTest"
81 // test case.
103 TEST(FactorialTest, Zero) {
108 TEST(FactorialTest, Positive) {
119 TEST(IsPrimeTest, Negative) {
120 // This test belongs to the IsPrimeTest test case.
128 TEST(IsPrimeTest, Trivial) {
136 TEST(IsPrimeTest, Positive) {