()
| 13 | } |
| 14 | |
| 15 | func getLCSTestCases() []testCaseLCS { |
| 16 | return []testCaseLCS{ |
| 17 | {"ABCDGH", "AEDFHR", 3}, |
| 18 | {"AGGTAB", "GXTXAYB", 4}, |
| 19 | {"programming", "gaming", 6}, |
| 20 | {"physics", "smartphone", 2}, |
| 21 | {"computer", "food", 1}, |
| 22 | {"123", "12345", 3}, |
| 23 | {"XYZ", "XYZ", 3}, |
| 24 | {"XYZ", "XYZa", 3}, |
| 25 | {"XYZ", "aXYZ", 3}, |
| 26 | {"0123", "abc", 0}, |
| 27 | {"abcdef", "aXbXcXXXdeXXf", 6}, |
| 28 | {"", "abc", 0}, |
| 29 | {"", "", 0}, |
| 30 | {"££", "££", 2}, |
| 31 | {"x笑x笑", "aaa笑a笑", 2}, |
| 32 | {"xYxY", "aaaYaY", 2}, |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | func TestLongestCommonSubsequence(t *testing.T) { |
| 37 | t.Run("Simple test", func(t *testing.T) { |
no outgoing calls
no test coverage detected