|
scenario_simulator_v2 C++ API
|
#include <gtest/gtest.h>#include <cmath>#include <limits>#include <sstream>#include "openscenario_interpreter/syntax/double.hpp"
Classes | |
| class | DoubleInfTest |
| class | DoubleNumericParseTest |
Namespaces | |
| anonymous_namespace{test_double.cpp} | |
Functions | |
| openscenario_interpreter::Double | anonymous_namespace{test_double.cpp}::parseDouble (const std::string &string) |
| TEST_P (DoubleInfTest, ParseInfinity) | |
| INSTANTIATE_TEST_SUITE_P (InfValues, DoubleInfTest, ::testing::Values(std::make_pair("INF", std::numeric_limits< double >::infinity()), std::make_pair("+INF", std::numeric_limits< double >::infinity()), std::make_pair("-INF", -std::numeric_limits< double >::infinity()))) | |
| TEST_P (DoubleNumericParseTest, ParseNumber) | |
| INSTANTIATE_TEST_SUITE_P (NumericValues, DoubleNumericParseTest, ::testing::Values(std::make_pair("123.45", 123.45), std::make_pair("-67.89", -67.89), std::make_pair("0", 0.0), std::make_pair("-0", -0.0), std::make_pair("1.23e10", 1.23e10), std::make_pair("-4.56e-5", -4.56e-5), std::make_pair("1.7976931348623157e+308", 1.7976931348623157e+308), std::make_pair("2.2250738585072014e-308", 2.2250738585072014e-308))) | |
| TEST (DoubleStaticMethods, StaticMethods) | |
| TEST (DoubleOperators, AssignmentAndArithmetic) | |
| TEST (DoubleOperators, OStream) | |
| TEST (DoubleSpecialCases, InvalidString) | |
| int | main (int argc, char **argv) |
| INSTANTIATE_TEST_SUITE_P | ( | InfValues | , |
| DoubleInfTest | , | ||
| ::testing::Values(std::make_pair("INF", std::numeric_limits< double >::infinity()), std::make_pair("+INF", std::numeric_limits< double >::infinity()), std::make_pair("-INF", -std::numeric_limits< double >::infinity())) | |||
| ) |
| INSTANTIATE_TEST_SUITE_P | ( | NumericValues | , |
| DoubleNumericParseTest | , | ||
| ::testing::Values(std::make_pair("123.45", 123.45), std::make_pair("-67.89", -67.89), std::make_pair("0", 0.0), std::make_pair("-0", -0.0), std::make_pair("1.23e10", 1.23e10), std::make_pair("-4.56e-5", -4.56e-5), std::make_pair("1.7976931348623157e+308", 1.7976931348623157e+308), std::make_pair("2.2250738585072014e-308", 2.2250738585072014e-308)) | |||
| ) |
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
| TEST | ( | DoubleOperators | , |
| AssignmentAndArithmetic | |||
| ) |
| TEST | ( | DoubleOperators | , |
| OStream | |||
| ) |
| TEST | ( | DoubleSpecialCases | , |
| InvalidString | |||
| ) |
| TEST | ( | DoubleStaticMethods | , |
| StaticMethods | |||
| ) |
| TEST_P | ( | DoubleInfTest | , |
| ParseInfinity | |||
| ) |
| TEST_P | ( | DoubleNumericParseTest | , |
| ParseNumber | |||
| ) |