Home | History | Annotate | Download | only in ADT

Lines Matching defs:theString

29   StringType theString;
43 assertEmpty(theString);
44 EXPECT_TRUE(theString.rbegin() == theString.rend());
48 theString.assign(3, 'a');
49 EXPECT_EQ(3u, theString.size());
50 EXPECT_STREQ("aaa", theString.c_str());
55 theString.assign(abc.begin(), abc.end());
56 EXPECT_EQ(3u, theString.size());
57 EXPECT_STREQ("abc", theString.c_str());
62 theString.assign(abc);
63 EXPECT_EQ(3u, theString.size());
64 EXPECT_STREQ("abc", theString.c_str());
70 theString.assign(abcVec);
71 EXPECT_EQ(3u, theString.size());
72 EXPECT_STREQ("abc", theString.c_str());
77 theString.append(abc.begin(), abc.end());
78 theString.append(abc.begin(), abc.end());
79 EXPECT_EQ(6u, theString.size());
80 EXPECT_STREQ("abcabc", theString.c_str());
85 theString.append(abc);
86 theString.append(abc);
87 EXPECT_EQ(6u, theString.size());
88 EXPECT_STREQ("abcabc", theString.c_str());
94 theString.append(abcVec);
95 theString.append(abcVec);
96 EXPECT_EQ(6u, theString.size());
97 EXPECT_STREQ("abcabc", theString.c_str());
101 theString = "hello";
102 EXPECT_EQ("lo", theString.substr(3));
103 EXPECT_EQ("", theString.substr(100));
104 EXPECT_EQ("hello", theString.substr(0, 100));
105 EXPECT_EQ("o", theString.substr(4, 10));
109 theString = "hello";
110 EXPECT_EQ("l", theString.slice(2, 3));
111 EXPECT_EQ("ell", theString.slice(1, 4));
112 EXPECT_EQ("llo", theString.slice(2, 100));
113 EXPECT_EQ("", theString.slice(2, 1));
114 EXPECT_EQ("", theString.slice(10, 20));
118 theString = "hello";
119 EXPECT_EQ(2U, theString.find('l'));
120 EXPECT_EQ(StringRef::npos, theString.find('z'));
121 EXPECT_EQ(StringRef::npos, theString.find("helloworld"));
122 EXPECT_EQ(0U, theString.find("hello"));
123 EXPECT_EQ(1U, theString.find("ello"));
124 EXPECT_EQ(StringRef::npos, theString.find("zz"));
125 EXPECT_EQ(2U, theString.find("ll", 2));
126 EXPECT_EQ(StringRef::npos, theString.find("ll", 3));
127 EXPECT_EQ(0U, theString.find(""));
129 EXPECT_EQ(3U, theString.rfind('l'));
130 EXPECT_EQ(StringRef::npos, theString.rfind('z'));
131 EXPECT_EQ(StringRef::npos, theString.rfind("helloworld"));
132 EXPECT_EQ(0U, theString.rfind("hello"));
133 EXPECT_EQ(1U, theString.rfind("ello"));
134 EXPECT_EQ(StringRef::npos, theString.rfind("zz"));
136 EXPECT_EQ(2U, theString.find_first_of('l'));
137 EXPECT_EQ(1U, theString.find_first_of("el"));
138 EXPECT_EQ(StringRef::npos, theString.find_first_of("xyz"));
140 EXPECT_EQ(1U, theString.find_first_not_of('h'));
141 EXPECT_EQ(4U, theString.find_first_not_of("hel"));
142 EXPECT_EQ(StringRef::npos, theString.find_first_not_of("hello"));
144 theString = "hellx xello hell ello world foo bar hello";
145 EXPECT_EQ(36U, theString.find("hello"));
146 EXPECT_EQ(28U, theString.find("foo"));
147 EXPECT_EQ(12U, theString.find("hell", 2));
148 EXPECT_EQ(0U, theString.find(""));
152 theString = "hello";
153 EXPECT_EQ(2U, theString.count('l'));
154 EXPECT_EQ(1U, theString.count('o'));
155 EXPECT_EQ(0U, theString.count('z'));
156 EXPECT_EQ(0U, theString.count("helloworld"));
157 EXPECT_EQ(1U, theString.count("hello"));
158 EXPECT_EQ(1U, theString.count("ello"));
159 EXPECT_EQ(0U, theString.count("zz"));