@@ -49,17 +49,17 @@ class ExpectedDiagConsumer : public DiagnosticConsumer {
4949 std::optional<unsigned > ExpectedDiagID;
5050
5151public:
52- void SetNoDiag () {
52+ void setNoDiag () {
5353 Satisfied = true ;
5454 ExpectedDiagID = std::nullopt ;
5555 }
5656
57- void SetExpected (unsigned DiagID) {
57+ void setExpected (unsigned DiagID) {
5858 Satisfied = false ;
5959 ExpectedDiagID = DiagID;
6060 }
6161
62- bool IsSatisfied () { return Satisfied; }
62+ bool isSatisfied () { return Satisfied; }
6363};
6464
6565// The test fixture.
@@ -75,7 +75,7 @@ class ParseHLSLRootSignatureTest : public ::testing::Test {
7575 Target = TargetInfo::CreateTargetInfo (Diags, TargetOpts);
7676 }
7777
78- std::unique_ptr<Preprocessor> CreatePP (StringRef Source,
78+ std::unique_ptr<Preprocessor> createPP (StringRef Source,
7979 TrivialModuleLoader &ModLoader) {
8080 std::unique_ptr<llvm::MemoryBuffer> Buf =
8181 llvm::MemoryBuffer::getMemBuffer (Source);
@@ -111,20 +111,20 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseEmptyTest) {
111111 const llvm::StringLiteral Source = R"cc( )cc" ;
112112
113113 TrivialModuleLoader ModLoader;
114- auto PP = CreatePP (Source, ModLoader);
114+ auto PP = createPP (Source, ModLoader);
115115 auto TokLoc = SourceLocation ();
116116
117117 hlsl::RootSignatureLexer Lexer (Source, TokLoc);
118118 SmallVector<RootElement> Elements;
119119 hlsl::RootSignatureParser Parser (Elements, Lexer, *PP);
120120
121121 // Test no diagnostics produced
122- Consumer->SetNoDiag ();
122+ Consumer->setNoDiag ();
123123
124- ASSERT_FALSE (Parser.Parse ());
124+ ASSERT_FALSE (Parser.parse ());
125125 ASSERT_EQ ((int )Elements.size (), 0 );
126126
127- ASSERT_TRUE (Consumer->IsSatisfied ());
127+ ASSERT_TRUE (Consumer->isSatisfied ());
128128}
129129
130130TEST_F (ParseHLSLRootSignatureTest, ValidParseDTClausesTest) {
@@ -139,17 +139,17 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseDTClausesTest) {
139139 )cc" ;
140140
141141 TrivialModuleLoader ModLoader;
142- auto PP = CreatePP (Source, ModLoader);
142+ auto PP = createPP (Source, ModLoader);
143143 auto TokLoc = SourceLocation ();
144144
145145 hlsl::RootSignatureLexer Lexer (Source, TokLoc);
146146 SmallVector<RootElement> Elements;
147147 hlsl::RootSignatureParser Parser (Elements, Lexer, *PP);
148148
149149 // Test no diagnostics produced
150- Consumer->SetNoDiag ();
150+ Consumer->setNoDiag ();
151151
152- ASSERT_FALSE (Parser.Parse ());
152+ ASSERT_FALSE (Parser.parse ());
153153
154154 // First Descriptor Table with 4 elements
155155 RootElement Elem = Elements[0 ];
@@ -176,7 +176,7 @@ TEST_F(ParseHLSLRootSignatureTest, ValidParseDTClausesTest) {
176176 Elem = Elements[5 ];
177177 ASSERT_TRUE (std::holds_alternative<DescriptorTable>(Elem));
178178 ASSERT_EQ (std::get<DescriptorTable>(Elem).NumClauses , 0u );
179- ASSERT_TRUE (Consumer->IsSatisfied ());
179+ ASSERT_TRUE (Consumer->isSatisfied ());
180180}
181181
182182// Invalid Parser Tests
@@ -188,18 +188,18 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidParseUnexpectedTokenTest) {
188188 )cc" ;
189189
190190 TrivialModuleLoader ModLoader;
191- auto PP = CreatePP (Source, ModLoader);
191+ auto PP = createPP (Source, ModLoader);
192192 auto TokLoc = SourceLocation ();
193193
194194 hlsl::RootSignatureLexer Lexer (Source, TokLoc);
195195 SmallVector<RootElement> Elements;
196196 hlsl::RootSignatureParser Parser (Elements, Lexer, *PP);
197197
198198 // Test correct diagnostic produced
199- Consumer->SetExpected (diag::err_expected);
200- ASSERT_TRUE (Parser.Parse ());
199+ Consumer->setExpected (diag::err_expected);
200+ ASSERT_TRUE (Parser.parse ());
201201
202- ASSERT_TRUE (Consumer->IsSatisfied ());
202+ ASSERT_TRUE (Consumer->isSatisfied ());
203203}
204204
205205TEST_F (ParseHLSLRootSignatureTest, InvalidParseInvalidTokenTest) {
@@ -208,18 +208,18 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidParseInvalidTokenTest) {
208208 )cc" ;
209209
210210 TrivialModuleLoader ModLoader;
211- auto PP = CreatePP (Source, ModLoader);
211+ auto PP = createPP (Source, ModLoader);
212212 auto TokLoc = SourceLocation ();
213213
214214 hlsl::RootSignatureLexer Lexer (Source, TokLoc);
215215 SmallVector<RootElement> Elements;
216216 hlsl::RootSignatureParser Parser (Elements, Lexer, *PP);
217217
218218 // Test correct diagnostic produced - invalid token
219- Consumer->SetExpected (diag::err_expected);
220- ASSERT_TRUE (Parser.Parse ());
219+ Consumer->setExpected (diag::err_expected);
220+ ASSERT_TRUE (Parser.parse ());
221221
222- ASSERT_TRUE (Consumer->IsSatisfied ());
222+ ASSERT_TRUE (Consumer->isSatisfied ());
223223}
224224
225225TEST_F (ParseHLSLRootSignatureTest, InvalidParseUnexpectedEndOfStreamTest) {
@@ -228,18 +228,18 @@ TEST_F(ParseHLSLRootSignatureTest, InvalidParseUnexpectedEndOfStreamTest) {
228228 )cc" ;
229229
230230 TrivialModuleLoader ModLoader;
231- auto PP = CreatePP (Source, ModLoader);
231+ auto PP = createPP (Source, ModLoader);
232232 auto TokLoc = SourceLocation ();
233233
234234 hlsl::RootSignatureLexer Lexer (Source, TokLoc);
235235 SmallVector<RootElement> Elements;
236236 hlsl::RootSignatureParser Parser (Elements, Lexer, *PP);
237237
238238 // Test correct diagnostic produced - end of stream
239- Consumer->SetExpected (diag::err_expected_after);
240- ASSERT_TRUE (Parser.Parse ());
239+ Consumer->setExpected (diag::err_expected_after);
240+ ASSERT_TRUE (Parser.parse ());
241241
242- ASSERT_TRUE (Consumer->IsSatisfied ());
242+ ASSERT_TRUE (Consumer->isSatisfied ());
243243}
244244
245245} // anonymous namespace
0 commit comments