Initial Course
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#include "std_string.hpp"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(StdString, ToUppercase) {
|
||||
EXPECT_EQ(arrays::to_uppercase("Hello"), "HELLO");
|
||||
}
|
||||
|
||||
TEST(StdString, Trim) {
|
||||
EXPECT_EQ(arrays::trim(" hi "), "hi");
|
||||
}
|
||||
|
||||
TEST(StdString, ReplaceAll) {
|
||||
EXPECT_EQ(arrays::replace_all("a-b-c", '-', '_'), "a_b_c");
|
||||
}
|
||||
|
||||
TEST(StdString, StartsWith) {
|
||||
EXPECT_TRUE(arrays::starts_with("C++26", "C++"));
|
||||
EXPECT_FALSE(arrays::starts_with("C++26", "Java"));
|
||||
}
|
||||
Reference in New Issue
Block a user