(t *testing.T)
| 22 | } |
| 23 | |
| 24 | func TestOptimalBST(t *testing.T) { |
| 25 | t.Run("Optimal Binary Search Tree test cases", func(t *testing.T) { |
| 26 | for _, tc := range getOptimalBSTTestCases() { |
| 27 | t.Run("testing optimal BST", func(t *testing.T) { |
| 28 | actual := dynamic.OptimalBST(tc.keys, tc.freq, tc.n) |
| 29 | if actual != tc.expected { |
| 30 | t.Errorf("OptimalBST(%v, %v, %d) = %d; expected %d", tc.keys, tc.freq, tc.n, actual, tc.expected) |
| 31 | } |
| 32 | }) |
| 33 | } |
| 34 | }) |
| 35 | } |
nothing calls this directly
no test coverage detected