https://mooseframework.inl.gov
SampleTest.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "gtest/gtest.h"
11 
12 TEST(MySampleTests, descriptiveTestName)
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  // ASSERT_NO_THROW(1 + 1);
23 
24  // for a complete list of assertions and for more unit testing documentation see:
25  // https://github.com/google/googletest/blob/master/googletest/docs/Primer.md
26 }
27 
28 TEST(MySampleTests, anotherTest)
29 {
30  EXPECT_LE(1, 2);
31  // ...
32 }
TEST(MySampleTests, descriptiveTestName)
Definition: SampleTest.C:12