mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-29 14:31:04 +00:00
Negative test for ExecutionModel.
This commit is contained in:
parent
d2c81cf34a
commit
2d6796d45d
@ -55,8 +55,8 @@ struct MemoryModelCase {
|
||||
std::string memory_name;
|
||||
};
|
||||
|
||||
using OpMemoryModelTest = spvtest::TextToBinaryTestBase<
|
||||
::testing::TestWithParam<MemoryModelCase>>;
|
||||
using OpMemoryModelTest =
|
||||
spvtest::TextToBinaryTestBase<::testing::TestWithParam<MemoryModelCase>>;
|
||||
|
||||
TEST_P(OpMemoryModelTest, AnyMemoryModelCase) {
|
||||
std::string input = "OpMemoryModel " + GetParam().addressing_name + " " +
|
||||
@ -98,8 +98,8 @@ struct EntryPointCase {
|
||||
std::string entry_point_name;
|
||||
};
|
||||
|
||||
using OpEntryPointTest = spvtest::TextToBinaryTestBase<
|
||||
::testing::TestWithParam<EntryPointCase>>;
|
||||
using OpEntryPointTest =
|
||||
spvtest::TextToBinaryTestBase<::testing::TestWithParam<EntryPointCase>>;
|
||||
|
||||
TEST_P(OpEntryPointTest, AnyEntryPointCase) {
|
||||
// TODO(dneto): utf-8, escaping, quoting cases for entry point name.
|
||||
@ -126,6 +126,11 @@ INSTANTIATE_TEST_CASE_P(TextToBinaryEntryPoint, OpEntryPointTest,
|
||||
#undef CASE
|
||||
// clang-format on
|
||||
|
||||
TEST_F(OpEntryPointTest, WrongModel) {
|
||||
EXPECT_THAT(CompileFailure("OpEntryPoint xxyyzz %1 \"fun\""),
|
||||
Eq("Invalid execution model 'xxyyzz'."));
|
||||
}
|
||||
|
||||
// Test OpExecutionMode
|
||||
|
||||
using OpExecutionModeTest = spvtest::TextToBinaryTestBase<
|
||||
|
Loading…
Reference in New Issue
Block a user