(t *testing.T, input string, testIndex int)
| 114 | } |
| 115 | |
| 116 | func 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 | } |
no test coverage detected