https://mooseframework.inl.gov
Functions
SampleTest.C File Reference

Go to the source code of this file.

Functions

 TEST (MySampleTests, descriptiveTestName)
 
 TEST (MySampleTests, anotherTest)
 

Function Documentation

◆ TEST() [1/2]

TEST ( MySampleTests  ,
descriptiveTestName   
)

Definition at line 12 of file SampleTest.C.

13 {
14  // compare equality
15  EXPECT_EQ(2, 1 + 1);
16  EXPECT_DOUBLE_EQ(2 * 3.5, 1.0 * 8 - 1);
17 
18  // compare equality and immediately terminate this test if it fails
19  // ASSERT_EQ(2, 1);
20 
21  // this won't run if you uncomment the above test because above assert will fail
22  int n = 0;
23  ASSERT_NO_THROW(n += 3);
24 
25  // for a complete list of assertions and for more unit testing documentation see:
26  // https://github.com/google/googletest/blob/master/googletest/docs/Primer.md
27 }

◆ TEST() [2/2]

TEST ( MySampleTests  ,
anotherTest   
)

Definition at line 29 of file SampleTest.C.

30 {
31  EXPECT_LE(1, 2);
32  // ...
33 }