Lines Matching defs:cases

53   const struct UnaryTestData cases[] = {
133 for (size_t i = 0; i < arraysize(cases); ++i) {
134 FilePath input(cases[i].input);
136 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) <<
142 const struct UnaryTestData cases[] = {
220 for (size_t i = 0; i < arraysize(cases); ++i) {
221 FilePath input(cases[i].input);
223 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) <<
229 const struct BinaryTestData cases[] = {
246 // Append introduces the default separator character, so these test cases
297 for (size_t i = 0; i < arraysize(cases); ++i) {
298 FilePath root(cases[i].inputs[0]);
299 FilePath::StringType leaf(cases[i].inputs[1]);
301 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed_str.value()) <<
304 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed_path.value()) <<
315 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed_str.value()) <<
321 const struct UnaryTestData cases[] = {
376 for (size_t i = 0; i < arraysize(cases); ++i) {
377 FilePath input(cases[i].input);
379 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) <<
385 const struct UnaryBooleanTestData cases[] = {
444 for (size_t i = 0; i < arraysize(cases); ++i) {
445 FilePath input(cases[i].input);
447 EXPECT_EQ(cases[i].expected, observed) <<
453 const struct UnaryTestData cases[] = {
490 for (size_t i = 0; i < arraysize(cases); ++i) {
491 FilePath input(cases[i].input);
500 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed) <<
506 const struct BinaryBooleanTestData cases[] = {
547 for (size_t i = 0; i < arraysize(cases); ++i) {
548 FilePath parent(cases[i].inputs[0]);
549 FilePath child(cases[i].inputs[1]);
551 EXPECT_EQ(parent.IsParent(child), cases[i].expected) <<
558 const struct BinaryTestData cases[] = {
611 for (size_t i = 0; i < arraysize(cases); ++i) {
612 FilePath parent(cases[i].inputs[0]);
613 FilePath child(cases[i].inputs[1]);
617 EXPECT_EQ(cases[i].expected[0] != '\0', success) <<
620 EXPECT_STREQ(cases[i].expected, result.value().c_str()) <<
627 EXPECT_EQ(cases[i].expected[0] != '\0', success) <<
630 EXPECT_EQ(base.Append(cases[i].expected).value(), result.value()) <<
638 const struct BinaryBooleanTestData cases[] = {
678 for (size_t i = 0; i < arraysize(cases); ++i) {
679 FilePath a(cases[i].inputs[0]);
680 FilePath b(cases[i].inputs[1]);
682 EXPECT_EQ(a == b, cases[i].expected) <<
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) <<
714 const struct UnaryTestData cases[] = {
752 for (unsigned int i = 0; i < arraysize(cases); ++i) {
753 FilePath path(cases[i].input);
755 EXPECT_STREQ(cases[i].expected, extension.c_str()) << "i: " << i <<
761 const struct BinaryTestData cases[] = {
820 for (unsigned int i = 0; i < arraysize(cases); ++i) {
821 FilePath path(cases[i].inputs[0]);
822 FilePath result = path.InsertBeforeExtension(cases[i].inputs[1]);
823 EXPECT_EQ(cases[i].expected, result.value()) << "i: " << i <<
824 ", path: " << path.value() << ", insert: " << cases[i].inputs[1];
829 const struct UnaryTestData cases[] = {
848 for (unsigned int i = 0; i < arraysize(cases); ++i) {
849 FilePath path(cases[i].input);
851 EXPECT_EQ(cases[i].expected, removed.value()) << "i: " << i <<
857 const struct BinaryTestData cases[] = {
886 for (unsigned int i = 0; i < arraysize(cases); ++i) {
887 FilePath path(cases[i].inputs[0]);
888 FilePath replaced = path.ReplaceExtension(cases[i].inputs[1]);
889 EXPECT_EQ(cases[i].expected, replaced.value()) << "i: " << i <<
890 ", path: " << path.value() << ", replace: " << cases[i].inputs[1];
895 const struct BinaryBooleanTestData cases[] = {
930 for (size_t i = 0; i < arraysize(cases); ++i) {
931 FilePath path(cases[i].inputs[0]);
932 FilePath::StringType ext(cases[i].inputs[1]);
934 EXPECT_EQ(cases[i].expected, path.MatchesExtension(ext)) <<
940 const struct BinaryIntTestData cases[] = {
1007 for (size_t i = 0; i < arraysize(cases); ++i) {
1008 FilePath::StringType s1(cases[i].inputs[0]);
1009 FilePath::StringType s2(cases[i].inputs[1]);
1011 EXPECT_EQ(cases[i].expected, result) <<
1017 const struct UnaryBooleanTestData cases[] = {
1039 for (size_t i = 0; i < arraysize(cases); ++i) {
1040 FilePath input(cases[i].input);
1042 EXPECT_EQ(cases[i].expected, observed) <<
1049 const struct UnaryTestData cases[] = {
1082 for (size_t i = 0; i < arraysize(cases); ++i) {
1083 FilePath input(cases[i].input);
1085 EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) <<