Adjust further code formatting

This commit is contained in:
Clang Format
2023-11-19 21:59:57 +01:00
committed by Jan
parent d5f881be04
commit c858695f0c
96 changed files with 4036 additions and 2241 deletions

View File

@ -125,14 +125,16 @@ namespace test::parsing::commands::sequence::sequence_action
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("test_struct_t")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("test_struct_t")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
auto result = helper.PerformTest();
@ -147,15 +149,17 @@ namespace test::parsing::commands::sequence::sequence_action
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("test_struct_t")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Identifier(pos, new std::string("arg_t")),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("test_struct_t")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Identifier(pos, new std::string("arg_t")),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
auto result = helper.PerformTest();
@ -171,17 +175,19 @@ namespace test::parsing::commands::sequence::sequence_action
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("test_struct_t")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Identifier(pos, new std::string("arg_t")),
CommandsParserValue::Character(pos, ','),
CommandsParserValue::Identifier(pos, new std::string("another_arg_t")),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("test_struct_t")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Identifier(pos, new std::string("arg_t")),
CommandsParserValue::Character(pos, ','),
CommandsParserValue::Identifier(pos, new std::string("another_arg_t")),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
auto result = helper.PerformTest();
@ -198,19 +204,21 @@ namespace test::parsing::commands::sequence::sequence_action
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("test_struct_t")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Identifier(pos, new std::string("arg_t")),
CommandsParserValue::Character(pos, ','),
CommandsParserValue::Identifier(pos, new std::string("another_arg_t")),
CommandsParserValue::Character(pos, ','),
CommandsParserValue::Identifier(pos, new std::string("yeet_t")),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("test_struct_t")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Identifier(pos, new std::string("arg_t")),
CommandsParserValue::Character(pos, ','),
CommandsParserValue::Identifier(pos, new std::string("another_arg_t")),
CommandsParserValue::Character(pos, ','),
CommandsParserValue::Identifier(pos, new std::string("yeet_t")),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
auto result = helper.PerformTest();
@ -228,14 +236,16 @@ namespace test::parsing::commands::sequence::sequence_action
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("unknown_struct_t")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("unknown_struct_t")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
REQUIRE_THROWS_AS(helper.PerformTest(), ParsingException);
REQUIRE(helper.m_test_struct->m_post_load_action == nullptr);
@ -245,19 +255,21 @@ namespace test::parsing::commands::sequence::sequence_action
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("test_struct_t")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Identifier(pos, new std::string("arg_t")),
CommandsParserValue::Character(pos, ','),
CommandsParserValue::Identifier(pos, new std::string("another_arg_t")),
CommandsParserValue::Character(pos, ','),
CommandsParserValue::Identifier(pos, new std::string("unknown_type_t")),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("test_struct_t")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Identifier(pos, new std::string("arg_t")),
CommandsParserValue::Character(pos, ','),
CommandsParserValue::Identifier(pos, new std::string("another_arg_t")),
CommandsParserValue::Character(pos, ','),
CommandsParserValue::Identifier(pos, new std::string("unknown_type_t")),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
REQUIRE_THROWS_AS(helper.PerformTest(), ParsingException);
REQUIRE(helper.m_test_struct->m_post_load_action == nullptr);
@ -267,13 +279,15 @@ namespace test::parsing::commands::sequence::sequence_action
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
REQUIRE_THROWS_AS(helper.PerformTest(), ParsingException);
REQUIRE(helper.m_test_struct->m_post_load_action == nullptr);
@ -283,13 +297,15 @@ namespace test::parsing::commands::sequence::sequence_action
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
helper.m_state->SetInUse(helper.m_test_struct);
auto result = helper.PerformTest();
@ -305,17 +321,19 @@ namespace test::parsing::commands::sequence::sequence_action
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("container_struct_t")),
CommandsParserValue::Character(pos, ':'),
CommandsParserValue::Character(pos, ':'),
CommandsParserValue::Identifier(pos, new std::string("m_child")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("container_struct_t")),
CommandsParserValue::Character(pos, ':'),
CommandsParserValue::Character(pos, ':'),
CommandsParserValue::Identifier(pos, new std::string("m_child")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
auto result = helper.PerformTest();
@ -330,14 +348,16 @@ namespace test::parsing::commands::sequence::sequence_action
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("m_child")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("m_child")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
helper.m_state->SetInUse(helper.m_test_struct2);
auto result = helper.PerformTest();
@ -353,17 +373,19 @@ namespace test::parsing::commands::sequence::sequence_action
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("container_struct_t")),
CommandsParserValue::Character(pos, ':'),
CommandsParserValue::Character(pos, ':'),
CommandsParserValue::Identifier(pos, new std::string("m_child")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("container_struct_t")),
CommandsParserValue::Character(pos, ':'),
CommandsParserValue::Character(pos, ':'),
CommandsParserValue::Identifier(pos, new std::string("m_child")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
helper.m_state->SetInUse(helper.m_arg_struct2);
auto result = helper.PerformTest();
@ -379,17 +401,19 @@ namespace test::parsing::commands::sequence::sequence_action
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("test_struct_t")),
CommandsParserValue::Character(pos, ':'),
CommandsParserValue::Character(pos, ':'),
CommandsParserValue::Identifier(pos, new std::string("m_test")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("set")),
CommandsParserValue::Identifier(pos, new std::string("action")),
CommandsParserValue::Identifier(pos, new std::string("test_struct_t")),
CommandsParserValue::Character(pos, ':'),
CommandsParserValue::Character(pos, ':'),
CommandsParserValue::Identifier(pos, new std::string("m_test")),
CommandsParserValue::Identifier(pos, new std::string("TestMethod")),
CommandsParserValue::Character(pos, '('),
CommandsParserValue::Character(pos, ')'),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
REQUIRE_THROWS_AS(helper.PerformTest(), ParsingException);
REQUIRE(helper.m_test_struct->m_post_load_action == nullptr);

View File

@ -41,10 +41,12 @@ namespace test::parsing::commands::sequence::sequence_architecture
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("architecture")),
CommandsParserValue::Identifier(pos, new std::string("x86")),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("architecture")),
CommandsParserValue::Identifier(pos, new std::string("x86")),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
auto result = helper.PerformTest();
@ -57,10 +59,12 @@ namespace test::parsing::commands::sequence::sequence_architecture
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("architecture")),
CommandsParserValue::Identifier(pos, new std::string("x86")),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("architecture")),
CommandsParserValue::Identifier(pos, new std::string("x86")),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
auto result = helper.PerformTest();
@ -73,10 +77,12 @@ namespace test::parsing::commands::sequence::sequence_architecture
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("architecture")),
CommandsParserValue::Identifier(pos, new std::string("x1337")),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("architecture")),
CommandsParserValue::Identifier(pos, new std::string("x1337")),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
REQUIRE_THROWS_AS(helper.PerformTest(), ParsingException);
REQUIRE(helper.m_repository->GetArchitecture() == Architecture::UNKNOWN);

View File

@ -41,10 +41,12 @@ namespace test::parsing::commands::sequence::sequence_game
{
CommandsSequenceTestsHelper helper;
const TokenPos pos;
helper.Tokens({CommandsParserValue::Identifier(pos, new std::string("game")),
CommandsParserValue::Identifier(pos, new std::string("very_cool_game")),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos)});
helper.Tokens({
CommandsParserValue::Identifier(pos, new std::string("game")),
CommandsParserValue::Identifier(pos, new std::string("very_cool_game")),
CommandsParserValue::Character(pos, ';'),
CommandsParserValue::EndOfFile(pos),
});
auto result = helper.PerformTest();