MCPcopy Create free account
hub / github.com/LissaGreense/GO4SQL / runParserErrorHandlingSuite

Function runParserErrorHandlingSuite

parser/parser_error_handling_test.go:247–255  ·  view source on GitHub ↗
(t *testing.T, suite []errorHandlingTestSuite)

Source from the content-addressed store, hash-verified

245}
246
247func runParserErrorHandlingSuite(t *testing.T, suite []errorHandlingTestSuite) {
248 for i, test := range suite {
249 errorMsg := getErrorMessage(t, test.input, i)
250
251 if errorMsg != test.expectedError {
252 t.Fatalf("[%v]Was expecting error: \n\t{%s},\n\tbut it was:\n\t{%s}", i, test.expectedError, errorMsg)
253 }
254 }
255}
256
257func getErrorMessage(t *testing.T, input string, testIndex int) string {
258 lexerInstance := lexer.RunLexer(input)

Calls 1

getErrorMessageFunction · 0.70

Tested by

no test coverage detected