RoveComm C++ 3.0.0
Welcome to the RoveComm C++ repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of RoveComm C++. The RoveComm C++ project is the RoveComm interface for high level systems and should not be used for microcontrollers.
Loading...
Searching...
No Matches
Example.cc File Reference

Unit/Integration Test Suite Example. More...

#include <gtest/gtest.h>
Include dependency graph for Example.cc:

Functions

 TEST (ExampleTests, TestIntegerOne_One)
 Test some basic multiplication.
 TEST (ExampleTests, TestIntegerZero_Zero)
 Test some basic addition.
 TEST (ExampleTests, TestIntegerZero_One)
 Test some basic subtraction.
 TEST (ExampleTests, TestDivision)
 Test some basic division.

Detailed Description

Unit/Integration Test Suite Example.

Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu)
Date
2023-07-24

Function Documentation

◆ TEST() [1/4]

TEST ( ExampleTests ,
TestDivision  )

Test some basic division.

Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu)
Date
2023-07-24
63{
64 const auto expected = 2;
65 const auto actual = 6 / 3;
66 ASSERT_EQ(actual, expected);
67}

◆ TEST() [2/4]

TEST ( ExampleTests ,
TestIntegerOne_One  )

Test some basic multiplication.

Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu)
Date
2023-07-24
21{
22 const auto expected = 18;
23 const auto actual = 6 * 3;
24 ASSERT_EQ(expected, actual);
25}

◆ TEST() [3/4]

TEST ( ExampleTests ,
TestIntegerZero_One  )

Test some basic subtraction.

Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu)
Date
2023-07-24
49{
50 const auto expected = 3;
51 const auto actual = 6 - 3;
52 ASSERT_EQ(actual, expected);
53}

◆ TEST() [4/4]

TEST ( ExampleTests ,
TestIntegerZero_Zero  )

Test some basic addition.

Author
Eli Byrd (edbgk.nosp@m.k@ms.nosp@m.t.edu)
Date
2023-07-24
35{
36 const auto expected = 9;
37 const auto actual = 6 + 3;
38 ASSERT_EQ(expected, actual);
39}