|
|
|
@@ -2,7 +2,6 @@ package template_test |
|
|
|
|
|
|
|
import ( |
|
|
|
_ "embed" |
|
|
|
"git.wtrh.nl/patterns/gopatterns/pkg/util" |
|
|
|
"math" |
|
|
|
"testing" |
|
|
|
|
|
|
|
@@ -10,6 +9,7 @@ import ( |
|
|
|
"git.wtrh.nl/patterns/gopatterns/pkg/position" |
|
|
|
"git.wtrh.nl/patterns/gopatterns/pkg/position/testutil" |
|
|
|
"git.wtrh.nl/patterns/gopatterns/pkg/template" |
|
|
|
"git.wtrh.nl/patterns/gopatterns/pkg/util" |
|
|
|
"git.wtrh.nl/patterns/gopatterns/pkg/vector" |
|
|
|
"github.com/stretchr/testify/require" |
|
|
|
"gopkg.in/yaml.v3" |
|
|
|
@@ -231,11 +231,11 @@ func TestFunctions(t *testing.T) { |
|
|
|
tests := map[string]struct { |
|
|
|
result float64 |
|
|
|
}{ |
|
|
|
"distance": {result: 5}, |
|
|
|
"angle": {result: math.Atan2(3, 4)}, |
|
|
|
"yDistance": {result: 3}, |
|
|
|
"xDistance": {result: 4}, |
|
|
|
"lineLength": {result: 12}, |
|
|
|
"distance": {result: 5}, |
|
|
|
"angle": {result: math.Atan2(3, 4)}, |
|
|
|
"yDistance": {result: 3}, |
|
|
|
"xDistance": {result: 4}, |
|
|
|
"lineLength": {result: 12}, |
|
|
|
"lineLength2": {result: 4}, |
|
|
|
} |
|
|
|
temp := &template.Template{} |
|
|
|
|