You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.3 KiB
55 lines
1.3 KiB
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <APRSParser.h>
|
|
|
|
|
|
|
|
// The fixture for testing class Foo.
|
|
class FooTest : public ::testing::Test {
|
|
protected:
|
|
// You can remove any or all of the following functions if their bodies would
|
|
// be empty.
|
|
|
|
FooTest() {
|
|
// You can do set-up work for each test here.
|
|
}
|
|
|
|
~FooTest() override {
|
|
// You can do clean-up work that doesn't throw exceptions here.
|
|
}
|
|
|
|
// If the constructor and destructor are not enough for setting up
|
|
// and cleaning up each test, you can define the following methods:
|
|
|
|
void SetUp() override {
|
|
// Code here will be called immediately after the constructor (right
|
|
// before each test).
|
|
}
|
|
|
|
void TearDown() override {
|
|
// Code here will be called immediately after each test (right
|
|
// before the destructor).
|
|
}
|
|
|
|
// Class members declared here can be used by all tests in the test suite
|
|
// for Foo.
|
|
};
|
|
|
|
// Tests that the Foo::Bar() method does Abc.
|
|
TEST_F(FooTest, MethodBarDoesAbc) {
|
|
const std::string input_filepath = "this/package/testdata/myinputfile.dat";
|
|
const std::string output_filepath = "this/package/testdata/myoutputfile.dat";
|
|
|
|
TAPRSFrame frame;
|
|
CAPRSParser::parseFrame("bla", frame);
|
|
|
|
EXPECT_EQ(frame.m_type, APFT_MESSAGE);
|
|
}
|
|
|
|
// Tests that Foo does Xyz.
|
|
TEST_F(FooTest, DoesXyz) {
|
|
// Exercises the Xyz feature of Foo.
|
|
}
|