| 57 | } |
| 58 | |
| 59 | UNIT_TEST(StringMatchCost_FullMatch) |
| 60 | { |
| 61 | TEST_EQUAL(FullMatchCost("", ""), 0, ()); |
| 62 | TEST_EQUAL(FullMatchCost("a", "b"), 1, ()); |
| 63 | TEST_EQUAL(FullMatchCost("a", ""), 1, ()); |
| 64 | TEST_EQUAL(FullMatchCost("", "b"), 1, ()); |
| 65 | TEST_EQUAL(FullMatchCost("ab", "cd"), 2, ()); |
| 66 | TEST_EQUAL(FullMatchCost("ab", "ba"), 1, ()); |
| 67 | TEST_EQUAL(FullMatchCost("abcd", "efgh"), 4, ()); |
| 68 | TEST_EQUAL(FullMatchCost("Hello!", "Hello!"), 0, ()); |
| 69 | TEST_EQUAL(FullMatchCost("Hello!", "Helo!"), 1, ()); |
| 70 | TEST_EQUAL(FullMatchCost("X", "X"), 0, ()); |
| 71 | TEST_EQUAL(FullMatchCost("X", "><"), 0, ()); |
| 72 | TEST_EQUAL(FullMatchCost("XXX", "><><><"), 0, ()); |
| 73 | TEST_EQUAL(FullMatchCost("XXX", "><X><"), 0, ()); |
| 74 | TEST_EQUAL(FullMatchCost("TeXt", "Te><t"), 0, ()); |
| 75 | TEST_EQUAL(FullMatchCost("TeXt", "Te><"), 1, ()); |
| 76 | TEST_EQUAL(FullMatchCost("TeXt", "TetX"), 1, ()); |
| 77 | TEST_EQUAL(FullMatchCost("TeXt", "Tet><"), 2, ()); |
| 78 | TEST_EQUAL(FullMatchCost("", "ALongString"), 11, ()); |
| 79 | TEST_EQUAL(FullMatchCost("x", "ALongString"), 11, ()); |
| 80 | TEST_EQUAL(FullMatchCost("g", "ALongString"), 10, ()); |
| 81 | } |
| 82 | |
| 83 | UNIT_TEST(StringMatchCost_MaxCost) |
| 84 | { |
nothing calls this directly
no test coverage detected