Add support for testing file-based HLSL source code in GTest.

This commit is contained in:
Lei Zhang
2016-05-16 12:50:30 -04:00
parent 4678ca9dac
commit d6f0ed2c81
8 changed files with 142 additions and 38 deletions

View File

@@ -49,7 +49,8 @@ using VulkanSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
TEST_P(CompileToSpirvTest, FromFile)
{
loadFileCompileAndCheck(GLSLANG_TEST_DIRECTORY, GetParam(),
Semantics::Vulkan, Target::Spirv);
Source::GLSL, Semantics::Vulkan,
Target::Spv);
}
// GLSL-level Vulkan semantics test. Expected to error out before generating
@@ -57,7 +58,8 @@ TEST_P(CompileToSpirvTest, FromFile)
TEST_P(VulkanSemantics, FromFile)
{
loadFileCompileAndCheck(GLSLANG_TEST_DIRECTORY, GetParam(),
Semantics::Vulkan, Target::Spirv);
Source::GLSL, Semantics::Vulkan,
Target::Spv);
}
// clang-format off
@@ -173,7 +175,7 @@ INSTANTIATE_TEST_CASE_P(
"spv.specConstant.comp",
"spv.specConstantComposite.vert",
})),
FileNameAsCustomTestName
FileNameAsCustomTestSuffix
);
INSTANTIATE_TEST_CASE_P(
@@ -183,7 +185,7 @@ INSTANTIATE_TEST_CASE_P(
"vulkan.vert",
"vulkan.comp",
})),
FileNameAsCustomTestName
FileNameAsCustomTestSuffix
);
// clang-format on