From 14bd3b9f213918f9d717f297496bfc5d3707bc3b Mon Sep 17 00:00:00 2001 From: Francis Visoiu Mistrih Date: Tue, 28 Nov 2017 16:11:56 +0000 Subject: [Support] Add unit test for printLowerCase Add test case for the function added in r319171. llvm-svn: 319177 --- llvm/unittests/ADT/StringExtrasTest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'llvm/unittests/ADT/StringExtrasTest.cpp') diff --git a/llvm/unittests/ADT/StringExtrasTest.cpp b/llvm/unittests/ADT/StringExtrasTest.cpp index 234a40d26cf..7bcdaf62fe5 100644 --- a/llvm/unittests/ADT/StringExtrasTest.cpp +++ b/llvm/unittests/ADT/StringExtrasTest.cpp @@ -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()); +} -- cgit v1.2.3