MCPcopy Index your code
hub / github.com/LissaGreense/GO4SQL / getErrorMessage

Function getErrorMessage

engine/engine_error_handling_test.go:116–131  ·  view source on GitHub ↗
(t *testing.T, input string, testIndex int)

Source from the content-addressed store, hash-verified

114}
115
116func getErrorMessage(t *testing.T, input string, testIndex int) string {
117 lexerInstance := lexer.RunLexer(input)
118 parserInstance := parser.New(lexerInstance)
119 sequences, parserError := parserInstance.ParseSequence()
120 if parserError != nil {
121 t.Fatalf("[%d] Error has occured in parser not in engine, error: %s", testIndex, parserError.Error())
122 }
123
124 engine := New()
125 _, engineError := engine.Evaluate(sequences)
126 if engineError == nil {
127 t.Fatalf("[%d] Was expecting error from engine but there was none", testIndex)
128 }
129
130 return engineError.Error()
131}

Callers 1

Calls 6

RunLexerFunction · 0.92
NewFunction · 0.92
ParseSequenceMethod · 0.80
EvaluateMethod · 0.80
NewFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected