diff --git a/Sources/Plasma/CoreLib/plString.h b/Sources/Plasma/CoreLib/plString.h index d4ddcaf8..efad1b0f 100644 --- a/Sources/Plasma/CoreLib/plString.h +++ b/Sources/Plasma/CoreLib/plString.h @@ -532,22 +532,22 @@ public: /** Inverse of operator==(const plString &) const. */ bool operator!=(const plString &other) const { return Compare(other) != 0; } - /** Find the index(in bytes) of the first instance of \a ch in this string. + /** Find the index (in bytes) of the first instance of \a ch in this string. * \return -1 if the character was not found. */ ssize_t Find(char ch, CaseSensitivity sense = kCaseSensitive) const; - /** Find the index(in bytes) of the last instance of \a ch in this string. + /** Find the index (in bytes) of the last instance of \a ch in this string. * \return -1 if the character was not found. */ ssize_t FindLast(char ch, CaseSensitivity sense = kCaseSensitive) const; - /** Find the index(in bytes) of the first instance of \a str in this string. + /** Find the index (in bytes) of the first instance of \a str in this string. * \return -1 if the substring was not found. */ ssize_t Find(const char *str, CaseSensitivity sense = kCaseSensitive) const; - /** Find the index(in bytes) of the first instance of \a str in this string. + /** Find the index (in bytes) of the first instance of \a str in this string. * \return -1 if the substring was not found. */ ssize_t Find(const plString &str, CaseSensitivity sense = kCaseSensitive) const @@ -583,8 +583,8 @@ public: */ plString Trim(const char *charset = WHITESPACE_CHARS) const; - /** Return a substring starting at index(in bytes) \a start, with up to \a size - * characters(in bytes) from the start position. If \a size is greater than the + /** Return a substring starting at index (in bytes) \a start, with up to \a size + * characters (in bytes) from the start position. If \a size is greater than the * number of characters left in the string after \a start, Substr will * return the remainder of the string. */ diff --git a/Sources/Tests/CMakeLists.txt b/Sources/Tests/CMakeLists.txt index b3352207..01a8093b 100644 --- a/Sources/Tests/CMakeLists.txt +++ b/Sources/Tests/CMakeLists.txt @@ -1,3 +1,4 @@ +set(gtest_force_shared_crt ON CACHE INTERNAL "don't link the CRT statically into gtest as we later link the test executable dynamically") add_subdirectory(gtest-1.6.0) add_subdirectory(CoreTests) diff --git a/Sources/Tests/CoreTests/test_plString.cpp b/Sources/Tests/CoreTests/test_plString.cpp index d9009229..f9cf0566 100644 --- a/Sources/Tests/CoreTests/test_plString.cpp +++ b/Sources/Tests/CoreTests/test_plString.cpp @@ -30,24 +30,6 @@ TEST(PlStringTest,ToIso8859_1) EXPECT_STREQ(expected.GetData(),output.GetData()); } -TEST(PlStringTest,Format) -{ - //string <256 characters - plString expected1 = plString("abcd3"); - plString output1 = plString::Format("a%c%s%d",'b',"cd",3); - EXPECT_EQ(expected1,output1); - - //string == 256 characters - plString expected2 = plString("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi elit erat, ornare vitae dictum non, accumsan nec orci. Pellentesque vel lectus magna, nec fermentum leo. Vestibulum venenatis sapien sit amet diam luctus laoreet. Integer accumsan iaculis amet."); - plString output2 = plString::Format("Lorem %s dolor sit amet, consectetur adipiscing elit. %s elit erat, ornare vitae dictum non, accumsan nec orci. Pellentesque vel lectus magna, nec fermentum leo. Vestibulum venenatis sapien sit amet diam luctus laoreet. Integer accumsan %s amet.","ipsum","Morbi","iaculis"); - EXPECT_EQ(expected2,output2); - - //string >256 characters - plString expected3 = plString("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur blandit iaculis metus eu gravida. Nulla ut lorem et tortor aliquam varius. Maecenas sed metus turpis. Mauris molestie velit aliquam felis suscipit egestas. Duis id arcu eget velit facilisis varius vitae ac neque. Quisque dapibus sed."); - plString output3 = plString::Format("Lorem ipsum dolor sit amet, %s adipiscing elit. Curabitur blandit iaculis metus eu gravida. Nulla ut lorem et tortor aliquam varius. Maecenas sed metus turpis. Mauris molestie velit aliquam felis suscipit %s. %s","consectetur","egestas","Duis id arcu eget velit facilisis varius vitae ac neque. Quisque dapibus sed."); - EXPECT_EQ(expected3,output3); -} - TEST(PlStringTest,FindChar) { plString input = plString("abCdcBAeab"); diff --git a/Sources/Tests/gtest-1.6.0/CMakeLists.txt b/Sources/Tests/gtest-1.6.0/CMakeLists.txt index ddd5443b..0fe26540 100644 --- a/Sources/Tests/gtest-1.6.0/CMakeLists.txt +++ b/Sources/Tests/gtest-1.6.0/CMakeLists.txt @@ -14,7 +14,7 @@ option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF) option( gtest_force_shared_crt "Use shared (DLL) run-time lib even when Google Test is built as static lib." - ON) + OFF) option(gtest_build_tests "Build all of gtest's own tests." OFF)