From aa2d6820879a2292416736d5d2a43cfed1bf6c45 Mon Sep 17 00:00:00 2001 From: Francis Visoiu Mistrih Date: Tue, 28 Nov 2017 16:11:56 +0000 Subject: [PATCH] [Support] Add unit test for printLowerCase Add test case for the function added in r319171. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319177 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/ADT/StringExtrasTest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/unittests/ADT/StringExtrasTest.cpp b/unittests/ADT/StringExtrasTest.cpp index 234a40d26cf..7bcdaf62fe5 100644 --- a/unittests/ADT/StringExtrasTest.cpp +++ b/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()); +} -- 2.50.1