Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions score/json/internal/model/any_test.cpp

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions score/json/internal/model/error_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TEST(Error, CanMakeError)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Use MakeError() to create Error instance.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

score::result::Error error = score::json::MakeError(Error::kParsingError);
Expand All @@ -45,7 +45,7 @@ TEST(Error, CanMakeErrorWithUserMessage)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Use MakeError() with error message to create Error instance.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

std::string_view userMessage{"User message"};
Expand All @@ -60,7 +60,7 @@ TEST(Error, CanGetMessageForWrongType)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get error message from WrongType error.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

score::result::Error error = score::json::MakeError(Error::kWrongType);
Expand All @@ -76,7 +76,7 @@ TEST(Error, CanGetMessageForKeyNotFound)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get error message from KeyNotFound error.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

score::result::Error error = score::json::MakeError(Error::kKeyNotFound);
Expand All @@ -92,7 +92,7 @@ TEST(Error, CanGetMessageForParsingError)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get error message from ParsingError error.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

score::result::Error error = score::json::MakeError(Error::kParsingError);
Expand All @@ -108,7 +108,7 @@ TEST(Error, CanGetMessageForInvalidFilePath)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get error message from InvalidFilePath error.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

score::result::Error error = score::json::MakeError(Error::kInvalidFilePath);
Expand All @@ -124,7 +124,7 @@ TEST(Error, CanGetMessageForUnknownError)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get error message from UnknownError.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

score::result::Error error = score::json::MakeError(Error::kUnknownError);
Expand All @@ -140,7 +140,7 @@ TEST(Error, CanGetMessageForUndefinedError)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get error message from UndefinedError.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

score::result::Error error = score::json::MakeError(static_cast<Error>(-1));
Expand Down
22 changes: 11 additions & 11 deletions score/json/internal/model/number_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ TEST(Number, FromUint8ToAnyOtherType)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Tests conversion of uint8 max value to different data types.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

TestFromUnsignedToAnyOtherType<uint8_t>(true, // uint8
Expand All @@ -110,7 +110,7 @@ TEST(Number, FromUint16ToAnyOtherType)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Tests conversion of uint16 max value to different data types.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

TestFromUnsignedToAnyOtherType<uint16_t>(false, // uint8
Expand All @@ -132,7 +132,7 @@ TEST(Number, FromUint32ToAnyOtherType)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Tests conversion of uint32 max value to different data types.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

TestFromUnsignedToAnyOtherType<uint32_t>(false, // uint8
Expand All @@ -154,7 +154,7 @@ TEST(Number, FromUint64ToAnyOtherType)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Tests conversion of uint64 max value to different data types.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

TestFromUnsignedToAnyOtherType<uint64_t>(false, // uint8
Expand Down Expand Up @@ -233,7 +233,7 @@ TEST(Number, FromInt8ToAnyOtherType)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Tests conversion of int8 different values to different data types.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

TestFromSignedToAnyOtherType<std::int8_t>(true, // int8
Expand All @@ -251,7 +251,7 @@ TEST(Number, FromInt16ToAnyOtherType)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Tests conversion of int16 different values to different data types.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

TestFromSignedToAnyOtherType<std::int16_t>(false, // int8
Expand All @@ -269,7 +269,7 @@ TEST(Number, FromInt32ToAnyOtherType)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Tests conversion of int32 different values to different data types.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

TestFromSignedToAnyOtherType<std::int32_t>(false, // int8
Expand All @@ -287,7 +287,7 @@ TEST(Number, FromInt64ToAnyOtherType)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Tests conversion of int64 different values to different data types.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

TestFromSignedToAnyOtherType<std::int64_t>(false, // int8
Expand Down Expand Up @@ -603,7 +603,7 @@ TEST(Number, FromFloatToAnyOtherType)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Tests conversion of float values to different data types.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

TestFloatingPointValues<float>(GetMaximumIntegerInFloat());
Expand All @@ -615,7 +615,7 @@ TEST(Number, FromDoubleToAnyOtherType)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Tests conversion of double values to different data types.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

TestFloatingPointValues<double>(GetMaximumIntegerInDouble());
Expand All @@ -633,7 +633,7 @@ TEST(Number, CheckEqualOperator)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Tests the equal comparator of Number.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");
{
uint64_t content = 42;
Expand Down
28 changes: 14 additions & 14 deletions score/json/internal/model/object_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ TEST_F(AttributeGettersTest, GetBoolUsingResult)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get bool attribute using Result<> input.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

// Test passing Result:
Expand All @@ -83,7 +83,7 @@ TEST_F(AttributeGettersTest, GetBoolDirectValue)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get bool attribute from direct Object reference.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

// Test passing direct value:
Expand All @@ -98,7 +98,7 @@ TEST_F(AttributeGettersTest, GetIntegerUsingResult)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get signed/unsigned integer attribute using Result<> input.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

Result<std::int64_t> attr_result_signed = GetAttribute<std::int64_t>(test_data_result_, "int");
Expand All @@ -116,7 +116,7 @@ TEST_F(AttributeGettersTest, GetIntegerDirectValue)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get signed/unsigned integer attribute from direct Object reference.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

Result<std::int64_t> attr_result_signed = GetAttribute<std::int64_t>(test_data_value_, "int");
Expand All @@ -134,7 +134,7 @@ TEST_F(AttributeGettersTest, GetFloatingPointUsingResult)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get float attribute using Result<>; double retrieval is forbidden.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

Result<float> float_result = GetAttribute<float>(test_data_result_, "float");
Expand All @@ -152,7 +152,7 @@ TEST_F(AttributeGettersTest, GetFloatingPointDirectValue)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get float attribute from direct value; double retrieval is forbidden.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

Result<float> float_result = GetAttribute<float>(test_data_value_, "float");
Expand All @@ -170,7 +170,7 @@ TEST_F(AttributeGettersTest, GetStringUsingResult)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get string attribute using Result<> input.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

Result<score::cpp::string_view> str_result = GetAttribute<score::cpp::string_view>(test_data_result_, "string");
Expand All @@ -186,7 +186,7 @@ TEST_F(AttributeGettersTest, GetStringDirectValue)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get string attribute from direct Object reference.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

Result<score::cpp::string_view> str_result = GetAttribute<score::cpp::string_view>(test_data_value_, "string");
Expand All @@ -202,7 +202,7 @@ TEST_F(AttributeGettersTest, GetListUsingResult)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get list attribute using Result<> input.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

auto list_result = GetAttribute<json::List>(test_data_result_, "list");
Expand All @@ -217,7 +217,7 @@ TEST_F(AttributeGettersTest, GetListDirectValue)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get list attribute from direct Object reference.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

auto list_result = GetAttribute<json::List>(test_data_value_, "list");
Expand All @@ -232,7 +232,7 @@ TEST_F(AttributeGettersTest, GetObjectUsingResult)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get nested object attribute using Result<> input.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

auto sub_object_result = GetAttribute<json::Object>(test_data_result_, "widget");
Expand All @@ -248,7 +248,7 @@ TEST_F(AttributeGettersTest, GetObjectDirectValue)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Get nested object attribute from direct Object reference.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

auto sub_object_result = GetAttribute<json::Object>(test_data_value_, "widget");
Expand All @@ -264,7 +264,7 @@ TEST_F(AttributeGettersTest, CascadingAccessSuccessCase)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Traverse nested objects (widget/geometry/size/width) successfully.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

const auto widget = GetAttribute<json::Object>(test_data_value_, "widget");
Expand All @@ -287,7 +287,7 @@ TEST_F(AttributeGettersTest, CascadingAccessErrorCase)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Fail gracefully when traversing with invalid keys.");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

// Invalid key
Expand Down
10 changes: 5 additions & 5 deletions score/json/internal/parser/json_parser_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ TEST(JsonParserTest, FromBuffer)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Parsing json object using FromBuffer(), cf. RFC-8259 section 9");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

json::JsonParser json_parser{};
Expand All @@ -71,7 +71,7 @@ TEST(JsonParserTest, ViaLiteral)
"Parsing json object using "
"_json operator, cf. RFC-8259 section 9");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

auto parsed_json = JSON_INPUT ""_json;
Expand All @@ -84,7 +84,7 @@ TEST(JsonParserTest, ViaErrorLiteral)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Parsing invalid json object using _json operator, cf. RFC-8259 section 9");
RecordProperty("TestType", "Requirements-based test");
RecordProperty("DerivationTechnique", "Analysis of requirements");
RecordProperty("DerivationTechnique", "requirements-analysis");
RecordProperty("Priority", "3");

EXPECT_EXIT(JSON_ERROR_INPUT ""_json, ::testing::KilledBySignal(SIGABRT), "");
Expand All @@ -96,7 +96,7 @@ TEST(JsonParserTest, FromFileSuceess)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Parsing json object from file path, cf. RFC-8259 section 9");
RecordProperty("TestType", "Interface test");
RecordProperty("DerivationTechnique", "Analysis of equivalence classes and boundary values");
RecordProperty("DerivationTechnique", "boundary-values");
RecordProperty("Priority", "3");

const std::string file_path = std::tmpnam(nullptr);
Expand All @@ -119,7 +119,7 @@ TEST(JsonParserTest, FromFileParseError)
RecordProperty("ASIL", "B");
RecordProperty("Description", "Parsing invalid json object from file path causes failure, cf. RFC-8259 section 9");
RecordProperty("TestType", "Requirements-based test");
RecordProperty("DerivationTechnique", "Analysis of requirements");
RecordProperty("DerivationTechnique", "requirements-analysis");
RecordProperty("Priority", "3");

const std::string file_path = std::tmpnam(nullptr);
Expand Down
Loading
Loading