(t *testing.T, suite []errorHandlingTestSuite)
| 104 | } |
| 105 | |
| 106 | func runEngineErrorHandlingSuite(t *testing.T, suite []errorHandlingTestSuite) { |
| 107 | for i, test := range suite { |
| 108 | errorMsg := getErrorMessage(t, test.input, i) |
| 109 | |
| 110 | if errorMsg != test.expectedError { |
| 111 | t.Fatalf("[%v]Was expecting error: \n\t{%s},\n\tbut it was:\n\t{%s}", i, test.expectedError, errorMsg) |
| 112 | } |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | func getErrorMessage(t *testing.T, input string, testIndex int) string { |
| 117 | lexerInstance := lexer.RunLexer(input) |
no test coverage detected