mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-10-27 05:35:40 +00:00
refactor: support multiple variants for games in zonecode
This commit is contained in:
61 files changed
+411
-288
No files matched your search
+5
-5
@@ -1,4 +1,4 @@
|
||||
#include "Parsing/Commands/Sequence/SequenceWordSize.h"
|
||||
#include "Parsing/Commands/Sequence/SequenceVariant.h"
|
||||
#include "Parsing/Mock/MockLexer.h"
|
||||
#include "Persistence/InMemory/InMemoryRepository.h"
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace test::parsing::commands::sequence::sequence_word_size
|
||||
bool PerformTest()
|
||||
{
|
||||
REQUIRE(m_lexer);
|
||||
const auto sequence = std::make_unique<SequenceWordSize>();
|
||||
const auto sequence = std::make_unique<SequenceVariant>();
|
||||
return sequence->MatchSequence(m_lexer.get(), m_state.get(), m_consumed_token_count);
|
||||
}
|
||||
};
|
||||
@@ -51,7 +51,7 @@ namespace test::parsing::commands::sequence::sequence_word_size
|
||||
|
||||
REQUIRE(result);
|
||||
REQUIRE(helper.m_consumed_token_count == 3);
|
||||
REQUIRE(helper.m_repository->GetWordSize() == WordSize::BITS_32);
|
||||
// REQUIRE(helper.m_repository->GetWordSize() == WordSize::BITS_32);
|
||||
}
|
||||
|
||||
TEST_CASE("SequenceWordSize: Ensure can set 64-bit", "[parsing][sequence]")
|
||||
@@ -69,7 +69,7 @@ namespace test::parsing::commands::sequence::sequence_word_size
|
||||
|
||||
REQUIRE(result);
|
||||
REQUIRE(helper.m_consumed_token_count == 3);
|
||||
REQUIRE(helper.m_repository->GetWordSize() == WordSize::BITS_64);
|
||||
// REQUIRE(helper.m_repository->GetWordSize() == WordSize::BITS_64);
|
||||
}
|
||||
|
||||
TEST_CASE("SequenceWordSize: Ensure cannot match unknown value", "[parsing][sequence]")
|
||||
@@ -84,6 +84,6 @@ namespace test::parsing::commands::sequence::sequence_word_size
|
||||
});
|
||||
|
||||
REQUIRE_THROWS_AS(helper.PerformTest(), ParsingException);
|
||||
REQUIRE(helper.m_repository->GetWordSize() == WordSize::UNKNOWN);
|
||||
// REQUIRE(helper.m_repository->GetWordSize() == WordSize::UNKNOWN);
|
||||
}
|
||||
} // namespace test::parsing::commands::sequence::sequence_word_size
|
||||
Reference in new issue
Block a user