(t *testing.T)
| 34 | } |
| 35 | |
| 36 | func TestLongestCommonSubsequence(t *testing.T) { |
| 37 | t.Run("Simple test", func(t *testing.T) { |
| 38 | for _, tc := range getLCSTestCases() { |
| 39 | actual := dynamic.LongestCommonSubsequence(tc.stringA, tc.stringB) |
| 40 | if actual != tc.expected { |
| 41 | t.Errorf("expected: %d, but got: %d", tc.expected, actual) |
| 42 | } |
| 43 | } |
| 44 | }) |
| 45 | |
| 46 | t.Run("Symmetry test", func(t *testing.T) { |
| 47 | for _, tc := range getLCSTestCases() { |
| 48 | actual := dynamic.LongestCommonSubsequence(tc.stringB, tc.stringA) |
| 49 | if actual != tc.expected { |
| 50 | t.Errorf("expected: %d, but got: %d", tc.expected, actual) |
| 51 | } |
| 52 | } |
| 53 | }) |
| 54 | } |
nothing calls this directly
no test coverage detected