mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 07:18:11 -05:00
test: add unit test for ImageIwdPostProcessor
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <format>
|
||||
#include <ranges>
|
||||
|
||||
AbstractImageIwdPostProcessor::AbstractImageIwdPostProcessor(const ZoneDefinitionContext& zoneDefinition,
|
||||
ISearchPath& searchPath,
|
||||
@ -58,7 +57,7 @@ void AbstractImageIwdPostProcessor::PostProcessAsset(XAssetInfoGeneric& assetInf
|
||||
while (m_current_iwd && m_zone_definition.m_asset_index_in_definition >= m_current_iwd_end_index)
|
||||
FindNextObjContainer();
|
||||
|
||||
if (m_current_iwd && m_zone_definition.m_asset_index_in_definition <= m_current_iwd_start_index)
|
||||
if (m_current_iwd && m_zone_definition.m_asset_index_in_definition >= m_current_iwd_start_index)
|
||||
m_current_iwd->AddFile(std::format("images/{}.iwi", assetInfo.m_name));
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,11 @@ void IwdToCreate::Build(ISearchPath& searchPath, IOutputPath& outPath)
|
||||
std::cout << std::format("Created iwd {} with {} entries\n", m_name, m_file_paths.size());
|
||||
}
|
||||
|
||||
const std::vector<std::string>& IwdToCreate::GetFilePaths() const
|
||||
{
|
||||
return m_file_paths;
|
||||
}
|
||||
|
||||
IwdToCreate* IwdCreator::GetOrAddIwd(const std::string& iwdName)
|
||||
{
|
||||
const auto existingIwd = m_iwd_lookup.find(iwdName);
|
||||
|
@ -15,6 +15,7 @@ public:
|
||||
|
||||
void AddFile(std::string filePath);
|
||||
void Build(ISearchPath& searchPath, IOutputPath& outPath);
|
||||
[[nodiscard]] const std::vector<std::string>& GetFilePaths() const;
|
||||
|
||||
private:
|
||||
std::string m_name;
|
||||
|
Reference in New Issue
Block a user