|
8 | 8 |
|
9 | 9 | #include "llvm/Object/DXContainer.h" |
10 | 10 | #include "../../tools/obj2yaml/dxcontainer2yaml.cpp" |
11 | | -#include "llvm/ADT/SmallString.h" |
12 | 11 | #include "llvm/ADT/StringRef.h" |
13 | 12 | #include "llvm/BinaryFormat/Magic.h" |
14 | 13 | #include "llvm/ObjectYAML/DXContainerYAML.h" |
15 | 14 | #include "llvm/ObjectYAML/yaml2obj.h" |
16 | 15 | #include "llvm/Support/MemoryBufferRef.h" |
17 | 16 | #include "llvm/Testing/Support/Error.h" |
18 | | -#include "gmock/gmock.h" |
19 | 17 | #include "gtest/gtest.h" |
20 | 18 |
|
21 | 19 | using namespace llvm; |
@@ -930,4 +928,24 @@ TEST(RootSignature, ParseRootConstant) { |
930 | 928 | EXPECT_THAT_ERROR(dxcontainer2yaml(OS, getMemoryBuffer<133>(Buffer)), |
931 | 929 | FailedWithMessage("Invalid value for parameter type")); |
932 | 930 | } |
| 931 | + { |
| 932 | + uint8_t Buffer[] = { |
| 933 | + 0x44, 0x58, 0x42, 0x43, 0x32, 0x9a, 0x53, 0xd8, 0xec, 0xbe, 0x35, 0x6f, |
| 934 | + 0x05, 0x39, 0xe1, 0xfe, 0x31, 0x20, 0xf0, 0xc1, 0x01, 0x00, 0x00, 0x00, |
| 935 | + 0x85, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, |
| 936 | + 0x52, 0x54, 0x53, 0x30, 0x59, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, |
| 937 | + 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 938 | + 0x2c, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, |
| 939 | + 0xFF, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, |
| 940 | + 0x0e, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 941 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 942 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 943 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 944 | + 0x00}; |
| 945 | + |
| 946 | + SmallString<256> Storage; |
| 947 | + raw_svector_ostream OS(Storage); |
| 948 | + EXPECT_THAT_ERROR(dxcontainer2yaml(OS, getMemoryBuffer<133>(Buffer)), |
| 949 | + FailedWithMessage("Invalid value for shader visibility")); |
| 950 | + } |
933 | 951 | } |
0 commit comments