Home | History | Annotate | Download | only in files

Lines Matching refs:cases

62   const struct UnaryTestData cases[] = {
142 for (size_t i = 0; i < arraysize(cases); ++i) {
143 FilePath input(cases[i].input);
145 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) <<
151 const struct UnaryTestData cases[] = {
229 for (size_t i = 0; i < arraysize(cases); ++i) {
230 FilePath input(cases[i].input);
232 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) <<
238 const struct BinaryTestData cases[] = {
255 // Append introduces the default separator character, so these test cases
306 for (size_t i = 0; i < arraysize(cases); ++i) {
307 FilePath root(cases[i].inputs[0]);
308 FilePath::StringType leaf(cases[i].inputs[1]);
310 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed_str.value()) <<
313 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed_path.value()) <<
324 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed_str.value()) <<
330 const struct UnaryTestData cases[] = {
385 for (size_t i = 0; i < arraysize(cases); ++i) {
386 FilePath input(cases[i].input);
388 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) <<
394 const struct UnaryBooleanTestData cases[] = {
453 for (size_t i = 0; i < arraysize(cases); ++i) {
454 FilePath input(cases[i].input);
456 EXPECT_EQ(cases[i].expected, observed) <<
462 const struct UnaryTestData cases[] = {
499 for (size_t i = 0; i < arraysize(cases); ++i) {
500 FilePath input(cases[i].input);
509 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed) <<
515 const struct BinaryBooleanTestData cases[] = {
556 for (size_t i = 0; i < arraysize(cases); ++i) {
557 FilePath parent(cases[i].inputs[0]);
558 FilePath child(cases[i].inputs[1]);
560 EXPECT_EQ(parent.IsParent(child), cases[i].expected) <<
567 const struct BinaryTestData cases[] = {
620 for (size_t i = 0; i < arraysize(cases); ++i) {
621 FilePath parent(cases[i].inputs[0]);
622 FilePath child(cases[i].inputs[1]);
626 EXPECT_EQ(cases[i].expected[0] != '\0', success) <<
629 EXPECT_STREQ(cases[i].expected, result.value().c_str()) <<
636 EXPECT_EQ(cases[i].expected[0] != '\0', success) <<
639 EXPECT_EQ(base.Append(cases[i].expected).value(), result.value()) <<
647 const struct BinaryBooleanTestData cases[] = {
687 for (size_t i = 0; i < arraysize(cases); ++i) {
688 FilePath a(cases[i].inputs[0]);
689 FilePath b(cases[i].inputs[1]);
691 EXPECT_EQ(a == b, cases[i].expected) <<
696 for (size_t i = 0; i < arraysize(cases); ++i) {
697 FilePath a(cases[i].inputs[0]);
698 FilePath b(cases[i].inputs[1]);
700 EXPECT_EQ(a != b, !cases[i].expected) <<
723 const struct UnaryTestData cases[] = {
765 for (unsigned int i = 0; i < arraysize(cases); ++i) {
766 FilePath path(cases[i].input);
768 EXPECT_STREQ(cases[i].expected, extension.c_str()) << "i: " << i <<
774 const struct BinaryTestData cases[] = {
833 for (unsigned int i = 0; i < arraysize(cases); ++i) {
834 FilePath path(cases[i].inputs[0]);
835 FilePath result = path.InsertBeforeExtension(cases[i].inputs[1]);
836 EXPECT_EQ(cases[i].expected, result.value()) << "i: " << i <<
837 ", path: " << path.value() << ", insert: " << cases[i].inputs[1];
842 const struct UnaryTestData cases[] = {
861 for (unsigned int i = 0; i < arraysize(cases); ++i) {
862 FilePath path(cases[i].input);
864 EXPECT_EQ(cases[i].expected, removed.value()) << "i: " << i <<
870 const struct BinaryTestData cases[] = {
899 for (unsigned int i = 0; i < arraysize(cases); ++i) {
900 FilePath path(cases[i].inputs[0]);
901 FilePath replaced = path.ReplaceExtension(cases[i].inputs[1]);
902 EXPECT_EQ(cases[i].expected, replaced.value()) << "i: " << i <<
903 ", path: " << path.value() << ", replace: " << cases[i].inputs[1];
908 const struct BinaryTestData cases[] = {
937 for (unsigned int i = 0; i < arraysize(cases); ++i) {
938 FilePath path(cases[i].inputs[0]);
939 FilePath added = path.AddExtension(cases[i].inputs[1]);
940 EXPECT_EQ(cases[i].expected, added.value()) << "i: " << i <<
941 ", path: " << path.value() << ", add: " << cases[i].inputs[1];
946 const struct BinaryBooleanTestData cases[] = {
981 for (size_t i = 0; i < arraysize(cases); ++i) {
982 FilePath path(cases[i].inputs[0]);
983 FilePath::StringType ext(cases[i].inputs[1]);
985 EXPECT_EQ(cases[i].expected, path.MatchesExtension(ext)) <<
991 const struct BinaryIntTestData cases[] = {
1058 for (size_t i = 0; i < arraysize(cases); ++i) {
1059 FilePath::StringType s1(cases[i].inputs[0]);
1060 FilePath::StringType s2(cases[i].inputs[1]);
1062 EXPECT_EQ(cases[i].expected, result) <<
1068 const struct UnaryBooleanTestData cases[] = {
1093 for (size_t i = 0; i < arraysize(cases); ++i) {
1094 FilePath input(cases[i].input);
1096 EXPECT_EQ(cases[i].expected, observed) <<
1102 const struct UTF8TestData cases[] = {
1111 for (size_t i = 0; i < arraysize(cases); ++i) {
1113 FilePath from_utf8 = FilePath::FromUTF8Unsafe(cases[i].utf8);
1114 EXPECT_EQ(cases[i].native, from_utf8.value())
1115 << "i: " << i << ", input: " << cases[i].native;
1117 FilePath from_native = FilePath(cases[i].native);
1118 EXPECT_EQ(cases[i].utf8, from_native.AsUTF8Unsafe())
1119 << "i: " << i << ", input: " << cases[i].native;
1161 const struct UnaryTestData cases[] = {
1194 for (size_t i = 0; i < arraysize(cases); ++i) {
1195 FilePath input(cases[i].input);
1197 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) <<
1204 const UnaryBooleanTestData cases[] = {
1211 for (size_t i = 0; i < arraysize(cases); ++i) {
1212 FilePath input = FilePath(cases[i].input).NormalizePathSeparators();
1213 EXPECT_EQ(cases[i].expected, input.EndsWithSeparator());
1218 const UnaryTestData cases[] = {
1224 for (size_t i = 0; i < arraysize(cases); ++i) {
1225 FilePath input = FilePath(cases[i].input).NormalizePathSeparators();
1226 FilePath expected = FilePath(cases[i].expected).NormalizePathSeparators();