Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Laupetin committed Jan 4, 2025
1 parent 6f1c02f commit 482bac6
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/ObjCompilingTests/Image/IPak/IPakCreatorTest.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "Image/IPak/IPakCreator.h"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "Image/ImageIPakPostProcessor.h"
1 change: 1 addition & 0 deletions test/ObjCompilingTests/Image/ImageIwdPostProcessorTest.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "Image/ImageIwdPostProcessor.h"
1 change: 1 addition & 0 deletions test/ObjCompilingTests/Iwd/IwdCreatorTest.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "Iwd/IwdCreator.h"
42 changes: 42 additions & 0 deletions test/ObjCompilingTests/KeyValuePairs/KeyValuePairsCreatorTest.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#include "KeyValuePairs/KeyValuePairsCreator.h"

#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
#include <catch2/matchers/catch_matchers_floating_point.hpp>
#include <memory>

using namespace std::string_literals;

namespace
{
class TestContext
{
public:
TestContext()
: m_memory(),
m_zone("test", 0, IGame::GetGameById(GameId::T6)),
m_zone_definition(),
m_zone_states(m_zone),
m_creators(m_zone),
m_ignored_assets(),
m_context(m_zone, &m_creators, &m_ignored_assets),
m_kvp_creator(m_zone_states.GetZoneAssetCreationState<KeyValuePairsCreator>())
{
}

std::unique_ptr<IAssetCreator> CreateSut()
{
return std::make_unique<KeyValuePairsCreator>(m_memory, m_zone, m_zone_definition, m_zone_states);
}

TestMemoryManager m_memory;
Zone m_zone;
ZoneDefinition m_zone_definition;
ZoneAssetCreationStateContainer m_zone_states;
AssetCreatorCollection m_creators;
IgnoredAssetLookup m_ignored_assets;
AssetCreationContext m_context;

KeyValuePairsCreator& m_kvp_creator;
};
} // namespace

0 comments on commit 482bac6

Please sign in to comment.