Skip to content

Commit 3da9228

Browse files
committed
Fix tests
1 parent e9fc483 commit 3da9228

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/ShaderArchiver/Archiver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
namespace nzsla
1414
{
1515
Archiver::Archiver(cxxopts::ParseResult& options) :
16-
m_options(options)
16+
m_options(options),
17+
m_outputToStdout(false)
1718
{
1819
}
1920

@@ -79,7 +80,7 @@ namespace nzsla
7980
("version", "Print version");
8081

8182
options.add_options("archive")
82-
("a,archive", "Archives the input shaders to an archive.");
83+
("a,archive", "Archives the input shaders to an archive.")
8384
("header", "Generates an includable header file.");
8485

8586
options.add_options("compression")

tests/src/Tests/NzslaTests.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,10 @@ module name: Engine.ViewerData
9595
CHECK(moduleResolver.Resolve("Engine.SkinningData"));
9696
CHECK(moduleResolver.Resolve("Engine.ViewerData"));
9797
CHECK_FALSE(moduleResolver.Resolve("NonExistent"));
98+
99+
// Test header generation
100+
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");
101+
102+
CheckHeaderMatch(Nz::Utf8Path("test_files/test_archive.nzsla"));
98103
}
99104
}

0 commit comments

Comments
 (0)