moved a subset of source file to the kern package
This commit is contained in:
@@ -6,6 +6,8 @@ package expr
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.portale-stac.it/go-pkg/expr/kern"
|
||||
)
|
||||
|
||||
func TestFuncBase(t *testing.T) {
|
||||
@@ -33,10 +35,10 @@ func TestFuncBase(t *testing.T) {
|
||||
/* 19 */ {`isFract(1:3)`, true, nil},
|
||||
/* 20 */ {`isFract(3:1)`, false, nil},
|
||||
/* 21 */ {`isRational(3:1)`, true, nil},
|
||||
/* 22 */ {`fract("2.2(3)")`, newFraction(67, 30), nil},
|
||||
/* 23 */ {`fract("1.21(3)")`, newFraction(91, 75), nil},
|
||||
/* 24 */ {`fract(1.21(3))`, newFraction(91, 75), nil},
|
||||
/* 25 */ {`fract(1.21)`, newFraction(121, 100), nil},
|
||||
/* 22 */ {`fract("2.2(3)")`, kern.NewFraction(67, 30), nil},
|
||||
/* 23 */ {`fract("1.21(3)")`, kern.NewFraction(91, 75), nil},
|
||||
/* 24 */ {`fract(1.21(3))`, kern.NewFraction(91, 75), nil},
|
||||
/* 25 */ {`fract(1.21)`, kern.NewFraction(121, 100), nil},
|
||||
/* 26 */ {`dec(2)`, float64(2), nil},
|
||||
/* 27 */ {`dec(2.0)`, float64(2), nil},
|
||||
/* 28 */ {`dec("2.0")`, float64(2), nil},
|
||||
@@ -45,8 +47,8 @@ func TestFuncBase(t *testing.T) {
|
||||
/* 31 */ {`dec()`, nil, `dec(): too few params -- expected 1, got 0`},
|
||||
/* 32 */ {`dec(1,2,3)`, nil, `dec(): too many params -- expected 1, got 3`},
|
||||
/* 33 */ {`isBool(false)`, true, nil},
|
||||
/* 34 */ {`fract(1:2)`, newFraction(1, 2), nil},
|
||||
/* 35 */ {`fract(12,2)`, newFraction(6, 1), nil},
|
||||
/* 34 */ {`fract(1:2)`, kern.NewFraction(1, 2), nil},
|
||||
/* 35 */ {`fract(12,2)`, kern.NewFraction(6, 1), nil},
|
||||
/* 36 */ {`bool(2)`, true, nil},
|
||||
/* 37 */ {`bool(1:2)`, true, nil},
|
||||
/* 38 */ {`bool(1.0)`, true, nil},
|
||||
|
||||
Reference in New Issue
Block a user