================ @@ -306,4 +307,254 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidLexRegNumberTest) { ASSERT_FALSE(Consumer->IsSatisfied()); } +// Valid Parser Tests + +TEST_F(ParseHLSLRootSignatureTest, ValidParseEmptyTest) { + const llvm::StringLiteral Source = R"cc()cc"; + + TrivialModuleLoader ModLoader; + auto PP = CreatePP(Source, ModLoader); + auto TokLoc = SourceLocation(); + + hlsl::RootSignatureLexer Lexer(Source, TokLoc, *PP); + SmallVector<RootElement> Elements; + hlsl::RootSignatureParser Parser(Elements, Lexer, Diags); + + // Test no diagnostics produced + Consumer->SetNoDiag(); + + ASSERT_FALSE(Parser.Parse()); + ASSERT_EQ((int)Elements.size(), 0); ---------------- inbelic wrote:
Updated this and other casting to use the `u` notation on the literals https://github.com/llvm/llvm-project/pull/122982 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits