6dd573c3f6
* Runtime error format * Parser and Compiler error formats updated
14 lines
343 B
Go
14 lines
343 B
Go
package parser_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/d5/tengo/assert"
|
|
"github.com/d5/tengo/compiler/parser"
|
|
"github.com/d5/tengo/compiler/source"
|
|
)
|
|
|
|
func TestError_Error(t *testing.T) {
|
|
err := &parser.Error{Pos: source.FilePos{Offset: 10, Line: 1, Column: 10}, Msg: "test"}
|
|
assert.Equal(t, "Parse Error: test\n\tat 1:10", err.Error())
|
|
}
|