From 18f8f608b966c802b3e2a389e3c1ec5a1fd9407b Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Tue, 18 Jul 2023 10:07:23 -0700 Subject: Remove some boost includes The less we rely on boost, and more on std algorithms, the less people have to look up, and the more likely that our code will deduplicate. Replace all uses of boost::algorithms with std alternatives. Tested: Redfish Service Validator passes. Change-Id: I8a26f39b5709adc444b4178e92f5f3c7b988b05b Signed-off-by: Ed Tanous --- test/include/str_utility_test.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'test') diff --git a/test/include/str_utility_test.cpp b/test/include/str_utility_test.cpp index a32ce09d95..c52cab9527 100644 --- a/test/include/str_utility_test.cpp +++ b/test/include/str_utility_test.cpp @@ -49,4 +49,29 @@ TEST(Split, Sensor) "unit", "name")); } +TEST(AsciiToLower, Positive) +{ + using bmcweb::asciiToLower; + // Noop + EXPECT_EQ(asciiToLower('a'), 'a'); + EXPECT_EQ(asciiToLower('z'), 'z'); + EXPECT_EQ(asciiToLower('0'), '0'); + EXPECT_EQ(asciiToLower('_'), '_'); + + // Converted + EXPECT_EQ(asciiToLower('A'), 'a'); + EXPECT_EQ(asciiToLower('Z'), 'z'); +} + +TEST(AsciiIEquals, Positive) +{ + using bmcweb::asciiIEquals; + EXPECT_TRUE(asciiIEquals("FOO", "foo")); + EXPECT_TRUE(asciiIEquals("foo", "foo")); + EXPECT_TRUE(asciiIEquals("", "")); + EXPECT_TRUE(asciiIEquals("_", "_")); + + EXPECT_FALSE(asciiIEquals("bar", "foo")); +} + } // namespace -- cgit v1.2.3