Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SirLynix committed Oct 13, 2024
1 parent e9fc483 commit 3da9228
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ShaderArchiver/Archiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
namespace nzsla
{
Archiver::Archiver(cxxopts::ParseResult& options) :
m_options(options)
m_options(options),
m_outputToStdout(false)
{
}

Expand Down Expand Up @@ -79,7 +80,7 @@ namespace nzsla
("version", "Print version");

options.add_options("archive")
("a,archive", "Archives the input shaders to an archive.");
("a,archive", "Archives the input shaders to an archive.")
("header", "Generates an includable header file.");

options.add_options("compression")
Expand Down
5 changes: 5 additions & 0 deletions tests/src/Tests/NzslaTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,10 @@ module name: Engine.ViewerData
CHECK(moduleResolver.Resolve("Engine.SkinningData"));
CHECK(moduleResolver.Resolve("Engine.ViewerData"));
CHECK_FALSE(moduleResolver.Resolve("NonExistent"));

// Test header generation
ExecuteCommand("./nzsla --archive --compress --header -o test_files/test_archive.nzsla.h ../resources/modules/Archive/InstanceData.nzslb ../resources/modules/Archive/LightData.nzslb ../resources/modules/Archive/SkeletalData.nzslb ../resources/modules/Archive/SkinningData.nzslb ../resources/modules/Archive/ViewerData.nzslb");

CheckHeaderMatch(Nz::Utf8Path("test_files/test_archive.nzsla"));
}
}

0 comments on commit 3da9228

Please sign in to comment.