mirror of
https://github.com/nasa/fprime.git
synced 2026-04-17 08:34:35 -05:00
* Add enum tests for FPP autocoder * Filter ai_xml sources against generated sources * Revise enum tests for FPP autocoder * Add test utils for FPP autocoder * Add array tests for FPP autocoder * Refactor FppTest * Add .gitignore * Revise enum tests for FPP autocoder * Revise array tests for FPP autocoder * Add string tests for FPP autocoder * Small changes to FPP autocoder tests * Add struct tests for FPP autocoder * Revise enum tests for FPP autocoder * Update ActiveLogger and Health components for new enum deserialize() behavior * Make string test suite type-parametrized * Update READMEs for FppTest * Register FppTest as a deployment and add README * Remove quotes from GENERATED_SOURCES * Begin transition to type-parametrized tests * Transition to type-parametrized tests * Small changes to FPP autocoder tests * Small fix to FPP autocoder tests * Update fprime-fpp version * Update expected words for spell checker * Small fix * Update fprime-fpp version * Add file headers * Update expected words for spell checker * Update fprime-fpp version * Update fprime-fpp version
45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
// ======================================================================
|
|
// \title main.cpp
|
|
// \author T. Chieu
|
|
// \brief main cpp file for FPP struct tests
|
|
//
|
|
// \copyright
|
|
// Copyright (C) 2009-2022 California Institute of Technology.
|
|
// ALL RIGHTS RESERVED. United States Government Sponsorship
|
|
// acknowledged.
|
|
//
|
|
// ======================================================================
|
|
|
|
#include "FppTest/struct/NonPrimitiveSerializableAc.hpp"
|
|
#include "FppTest/struct/MultiStringSerializableAc.hpp"
|
|
#include "FppTest/typed_tests/StringTest.hpp"
|
|
|
|
#include "STest/Random/Random.hpp"
|
|
#include "gtest/gtest.h"
|
|
|
|
// Instantiate string tests for structs
|
|
using StringTestImplementations = ::testing::Types<
|
|
NonPrimitive::StringSize80,
|
|
MultiString::StringSize50,
|
|
MultiString::StringSize60,
|
|
MultiString::StringSize80
|
|
>;
|
|
INSTANTIATE_TYPED_TEST_SUITE_P(Struct, StringTest, StringTestImplementations);
|
|
|
|
template<>
|
|
U32 FppTest::String::getSize<MultiString::StringSize50>() {
|
|
return 50;
|
|
}
|
|
|
|
template<>
|
|
U32 FppTest::String::getSize<MultiString::StringSize60>() {
|
|
return 60;
|
|
}
|
|
|
|
int main(int argc, char* argv[]) {
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
STest::Random::seed();
|
|
|
|
return RUN_ALL_TESTS();
|
|
}
|