StatusTests.cpp
Go to the documentation of this file.
1 #include <cppunit/extensions/HelperMacros.h>
2 #include <NovaDAQUtilities/Status.h>
3 
4 using namespace novadaq;
5 
6 class StatusTests : public CppUnit::TestFixture
7 {
8  CPPUNIT_TEST_SUITE(StatusTests);
9  CPPUNIT_TEST(testStatusBasic);
10  CPPUNIT_TEST_SUITE_END();
11 
12 public:
13  void setUp();
14  void tearDown();
15 
16  void testStatusBasic();
17 
18 private:
19 
20 };
21 
22 void
24 {
25 }
26 
27 void
29 {
30 }
31 
32 void
34 {
35  // check that we get what we set
36  Status myStatus;
37  myStatus.code = 0xdeadbeef;
38  myStatus.message = "Hello, World!";
39 
40  CPPUNIT_ASSERT(myStatus.code == (int) 0xdeadbeef);
41  CPPUNIT_ASSERT(myStatus.message == "Hello, World!");
42 }
43 
45 CPPUNIT_REGISTRY_ADD_TO_DEFAULT("NovaDAQUtilities");
void tearDown()
Definition: StatusTests.cpp:28
void setUp()
Definition: StatusTests.cpp:23
int32_t code
Definition: Status.h:22
CPPUNIT_REGISTRY_ADD_TO_DEFAULT("NovaDAQUtilities")
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(StatusTests,"NovaDAQUtilities")
void testStatusBasic()
Definition: StatusTests.cpp:33
std::string message
Definition: Status.h:24