Home | History | Annotate | Download | only in test

Lines Matching refs:StringUtil

18 #include <StringUtil.h>
27 ASSERT_TRUE(StringUtil::compare(str, "hello") == 0);
28 ASSERT_TRUE(StringUtil::compare(str, "hi") != 0);
34 android::String8 sub1 = StringUtil::substr(str, 0, 5);
35 ASSERT_TRUE(StringUtil::compare(sub1, "hello") == 0);
37 android::String8 sub2 = StringUtil::substr(str, 10, 5);
38 ASSERT_TRUE(StringUtil::compare(sub2, "e") == 0);
40 android::String8 sub3 = StringUtil::substr(str, 6, 5);
41 ASSERT_TRUE(StringUtil::compare(sub3, "there") == 0);
43 android::String8 sub4 = StringUtil::substr(str, 100, 5);
49 ASSERT_TRUE(StringUtil::endsWith(str, "there"));
50 ASSERT_TRUE(StringUtil::endsWith(str, "hello there"));
51 ASSERT_TRUE(!StringUtil::endsWith(str, "not there"));
56 std::vector<android::String8>* tokens = StringUtil::split(str, ':');
59 ASSERT_TRUE(StringUtil::compare(tokens->at(0), "hello") == 0);
60 ASSERT_TRUE(StringUtil::compare(tokens->at(1), "there") == 0);
61 ASSERT_TRUE(StringUtil::compare(tokens->at(2), "break") == 0);
62 ASSERT_TRUE(StringUtil::compare(tokens->at(3), "this") == 0);
66 std::vector<android::String8>* tokens2 = StringUtil::split(str2, ':');