r322240 - [Lex] Inline a variable in test in preparation for more similar tests. NFC.

Volodymyr Sapsai via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 10 15:37:29 PST 2018


Author: vsapsai
Date: Wed Jan 10 15:37:29 2018
New Revision: 322240

URL: http://llvm.org/viewvc/llvm-project?rev=322240&view=rev
Log:
[Lex] Inline a variable in test in preparation for more similar tests. NFC.

Modified:
    cfe/trunk/unittests/Lex/LexerTest.cpp

Modified: cfe/trunk/unittests/Lex/LexerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Lex/LexerTest.cpp?rev=322240&r1=322239&r2=322240&view=diff
==============================================================================
--- cfe/trunk/unittests/Lex/LexerTest.cpp (original)
+++ cfe/trunk/unittests/Lex/LexerTest.cpp Wed Jan 10 15:37:29 2018
@@ -474,8 +474,7 @@ TEST_F(LexerTest, GetBeginningOfTokenWit
 }
 
 TEST_F(LexerTest, AvoidPastEndOfStringDereference) {
-  std::vector<Token> LexedTokens = Lex("  //  \\\n");
-  EXPECT_TRUE(LexedTokens.empty());
+  EXPECT_TRUE(Lex("  //  \\\n").empty());
 }
 
 TEST_F(LexerTest, StringizingRasString) {




More information about the cfe-commits mailing list