fprime/FppTest/enum/IsValidTest.cpp
Tiffany Chieu 44e8917bb7
FPP v1.1.0 Integration (#1630)
* 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
2022-11-09 09:19:34 -08:00

55 lines
1.4 KiB
C++

// ======================================================================
// \title IsValidTest.cpp
// \author T. Chieu
// \brief cpp file for IsValidTest class
//
// \copyright
// Copyright (C) 2009-2022 California Institute of Technology.
// ALL RIGHTS RESERVED. United States Government Sponsorship
// acknowledged.
//
// ======================================================================
#include "FppTest/enum/IntervalEnumAc.hpp"
#include "gtest/gtest.h"
// Test boundary values for enum isValid() function
TEST(IsValidTest, IntervalEnum) {
Interval e = static_cast<Interval::T>(-1);
ASSERT_FALSE(e.isValid());
e = static_cast<Interval::T>(0);
ASSERT_TRUE(e.isValid());
e = static_cast<Interval::T>(1);
ASSERT_FALSE(e.isValid());
e = static_cast<Interval::T>(2);
ASSERT_FALSE(e.isValid());
e = static_cast<Interval::T>(3);
ASSERT_TRUE(e.isValid());
e = static_cast<Interval::T>(5);
ASSERT_TRUE(e.isValid());
e = static_cast<Interval::T>(6);
ASSERT_FALSE(e.isValid());
e = static_cast<Interval::T>(10);
ASSERT_TRUE(e.isValid());
e = static_cast<Interval::T>(99);
ASSERT_FALSE(e.isValid());
e = static_cast<Interval::T>(100);
ASSERT_TRUE(e.isValid());
e = static_cast<Interval::T>(101);
ASSERT_TRUE(e.isValid());
e = static_cast<Interval::T>(102);
ASSERT_FALSE(e.isValid());
}