[llvm] r319177 - [Support] Add unit test for printLowerCase
Francis Visoiu Mistrih via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 28 08:11:56 PST 2017
Author: thegameg
Date: Tue Nov 28 08:11:56 2017
New Revision: 319177
URL: http://llvm.org/viewvc/llvm-project?rev=319177&view=rev
Log:
[Support] Add unit test for printLowerCase
Add test case for the function added in r319171.
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=319177&r1=319176&r2=319177&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/StringExtrasTest.cpp (original)
+++ llvm/trunk/unittests/ADT/StringExtrasTest.cpp Tue Nov 28 08:11:56 2017
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/ADT/StringExtras.h"
+#include "llvm/Support/raw_ostream.h"
#include "gtest/gtest.h"
using namespace llvm;
@@ -84,3 +85,10 @@ TEST(StringExtrasTest, to_float) {
EXPECT_FALSE(to_float("7.4 foo", F));
EXPECT_FLOAT_EQ(4.7f, F); // F should be unchanged
}
+
+TEST(StringExtrasTest, printLowerCase) {
+ std::string str;
+ raw_string_ostream OS(str);
+ printLowerCase("ABCdefg01234.,&!~`'}\"", OS);
+ EXPECT_EQ("abcdefg01234.,&!~`'}\"", OS.str());
+}
More information about the llvm-commits
mailing list