@@ -120,6 +120,36 @@ TEST_F(LexHLSLRootSignatureTest, ValidLexAllTokensTest) {
120120 CheckTokens (Lexer, Tokens, Expected);
121121}
122122
123+ TEST_F (LexHLSLRootSignatureTest, ValidCaseInsensitiveKeywordsTest) {
124+ // This test will check that we can lex keywords in an case-insensitive
125+ // manner
126+ const llvm::StringLiteral Source = R"cc(
127+ DeScRiPtOrTaBlE
128+
129+ CBV srv UAV sampler
130+ SPACE visibility FLAGS
131+ numDescriptors OFFSET
132+ )cc" ;
133+ auto TokLoc = SourceLocation ();
134+ hlsl::RootSignatureLexer Lexer (Source, TokLoc);
135+
136+ SmallVector<hlsl::RootSignatureToken> Tokens;
137+ SmallVector<hlsl::TokenKind> Expected = {
138+ hlsl::TokenKind::kw_DescriptorTable,
139+ hlsl::TokenKind::kw_CBV,
140+ hlsl::TokenKind::kw_SRV,
141+ hlsl::TokenKind::kw_UAV,
142+ hlsl::TokenKind::kw_Sampler,
143+ hlsl::TokenKind::kw_space,
144+ hlsl::TokenKind::kw_visibility,
145+ hlsl::TokenKind::kw_flags,
146+ hlsl::TokenKind::kw_numDescriptors,
147+ hlsl::TokenKind::kw_offset,
148+ };
149+
150+ CheckTokens (Lexer, Tokens, Expected);
151+ }
152+
123153TEST_F (LexHLSLRootSignatureTest, ValidLexPeekTest) {
124154 // This test will check that we the peek api is correctly used
125155 const llvm::StringLiteral Source = R"cc(
0 commit comments