[llvm] r333590 - [ADT] Add unit test for PrintHTMLEscaped
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Wed May 30 13:47:18 PDT 2018
Author: jdevlieghere
Date: Wed May 30 13:47:18 2018
New Revision: 333590
URL: http://llvm.org/viewvc/llvm-project?rev=333590&view=rev
Log:
[ADT] Add unit test for PrintHTMLEscaped
Add unit tests for PrintHTMLEscaped which was added in r333565.
Modified:
llvm/trunk/unittests/ADT/StringExtrasTest.cpp
Modified: llvm/trunk/unittests/ADT/StringExtrasTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/StringExtrasTest.cpp?rev=333590&r1=333589&r2=333590&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/StringExtrasTest.cpp (original)
+++ llvm/trunk/unittests/ADT/StringExtrasTest.cpp Wed May 30 13:47:18 2018
@@ -92,3 +92,10 @@ TEST(StringExtrasTest, printLowerCase) {
printLowerCase("ABCdefg01234.,&!~`'}\"", OS);
EXPECT_EQ("abcdefg01234.,&!~`'}\"", OS.str());
}
+
+TEST(StringExtrasTest, PrintHTMLEscaped) {
+ std::string str;
+ raw_string_ostream OS(str);
+ PrintHTMLEscaped("ABCdef123&<>\"'", OS);
+ EXPECT_EQ("ABCdef123&<>"'", OS.str());
+}
More information about the llvm-commits
mailing list