mirror of
https://github.com/hanzoai/expr.git
synced 2026-09-24 16:58:58 +00:00
fork: rename module to github.com/hanzoai/expr
This commit is contained in:
@@ -16,7 +16,7 @@ const exclude = [
|
||||
cd(path.resolve(__dirname, '..', '..'))
|
||||
|
||||
await spinner('Running tests', async () => {
|
||||
await $`go test -coverprofile=coverage.out -coverpkg=github.com/expr-lang/expr/... ./...`
|
||||
await $`go test -coverprofile=coverage.out -coverpkg=github.com/hanzoai/expr/... ./...`
|
||||
const coverage = fs.readFileSync('coverage.out').toString()
|
||||
.split('\n')
|
||||
.filter(line => {
|
||||
|
||||
+2
-2
@@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/hanzoai/expr"
|
||||
)
|
||||
|
||||
// TestUserDefinedStaticLabels tests examples from the User-Defined Static Labels section
|
||||
|
||||
+2
-2
@@ -3,9 +3,9 @@ package ast_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
)
|
||||
|
||||
func TestFind(t *testing.T) {
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@ package ast
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/expr-lang/expr/checker/nature"
|
||||
"github.com/expr-lang/expr/file"
|
||||
"github.com/hanzoai/expr/checker/nature"
|
||||
"github.com/hanzoai/expr/file"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/expr-lang/expr/parser/operator"
|
||||
"github.com/expr-lang/expr/parser/utils"
|
||||
"github.com/hanzoai/expr/parser/operator"
|
||||
"github.com/hanzoai/expr/parser/utils"
|
||||
)
|
||||
|
||||
func (n *NilNode) String() string {
|
||||
|
||||
+4
-4
@@ -3,11 +3,11 @@ package ast_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/parser"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/parser"
|
||||
)
|
||||
|
||||
func TestPrint(t *testing.T) {
|
||||
|
||||
+2
-2
@@ -3,9 +3,9 @@ package ast_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
)
|
||||
|
||||
type visitor struct {
|
||||
|
||||
+3
-3
@@ -3,10 +3,10 @@ package expr_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/vm"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/vm"
|
||||
)
|
||||
|
||||
func Benchmark_expr(b *testing.B) {
|
||||
|
||||
+2
-2
@@ -9,8 +9,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/expr-lang/expr/internal/deref"
|
||||
"github.com/expr-lang/expr/vm/runtime"
|
||||
"github.com/hanzoai/expr/internal/deref"
|
||||
"github.com/hanzoai/expr/vm/runtime"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -7,15 +7,15 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/builtin"
|
||||
"github.com/expr-lang/expr/checker"
|
||||
"github.com/expr-lang/expr/conf"
|
||||
"github.com/expr-lang/expr/parser"
|
||||
"github.com/expr-lang/expr/test/mock"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/builtin"
|
||||
"github.com/hanzoai/expr/checker"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
"github.com/hanzoai/expr/parser"
|
||||
"github.com/hanzoai/expr/test/mock"
|
||||
)
|
||||
|
||||
func TestBuiltin(t *testing.T) {
|
||||
@@ -507,7 +507,7 @@ func TestBuiltin_type(t *testing.T) {
|
||||
{func() {}, "func"},
|
||||
{time.Now(), "time.Time"},
|
||||
{time.Second, "time.Duration"},
|
||||
{Foo{}, "github.com/expr-lang/expr/builtin_test.Foo"},
|
||||
{Foo{}, "github.com/hanzoai/expr/builtin_test.Foo"},
|
||||
{struct{}{}, "struct"},
|
||||
{a, "int"},
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,8 +7,8 @@ import (
|
||||
"strconv"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/expr-lang/expr/internal/deref"
|
||||
"github.com/expr-lang/expr/vm/runtime"
|
||||
"github.com/hanzoai/expr/internal/deref"
|
||||
"github.com/hanzoai/expr/vm/runtime"
|
||||
)
|
||||
|
||||
func Len(x any) any {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import (
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
"github.com/expr-lang/expr/internal/deref"
|
||||
"github.com/hanzoai/expr/internal/deref"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/expr-lang/expr/internal/deref"
|
||||
"github.com/hanzoai/expr/internal/deref"
|
||||
)
|
||||
|
||||
func validateAggregateFunc(name string, args []reflect.Type) (reflect.Type, error) {
|
||||
|
||||
+6
-6
@@ -6,12 +6,12 @@ import (
|
||||
"regexp"
|
||||
"time"
|
||||
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/builtin"
|
||||
. "github.com/expr-lang/expr/checker/nature"
|
||||
"github.com/expr-lang/expr/conf"
|
||||
"github.com/expr-lang/expr/file"
|
||||
"github.com/expr-lang/expr/parser"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/builtin"
|
||||
. "github.com/hanzoai/expr/checker/nature"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
"github.com/hanzoai/expr/file"
|
||||
"github.com/hanzoai/expr/parser"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -4,12 +4,12 @@ import (
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/checker"
|
||||
"github.com/expr-lang/expr/checker/nature"
|
||||
"github.com/expr-lang/expr/conf"
|
||||
"github.com/expr-lang/expr/parser"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/checker"
|
||||
"github.com/hanzoai/expr/checker/nature"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
"github.com/hanzoai/expr/parser"
|
||||
)
|
||||
|
||||
func BenchmarkChecker(b *testing.B) {
|
||||
|
||||
@@ -8,16 +8,16 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/expr-lang/expr/types"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/types"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/checker"
|
||||
"github.com/expr-lang/expr/conf"
|
||||
"github.com/expr-lang/expr/parser"
|
||||
"github.com/expr-lang/expr/test/mock"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/checker"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
"github.com/hanzoai/expr/parser"
|
||||
"github.com/hanzoai/expr/test/mock"
|
||||
)
|
||||
|
||||
func TestCheck(t *testing.T) {
|
||||
|
||||
+3
-3
@@ -3,9 +3,9 @@ package checker
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/expr-lang/expr/ast"
|
||||
. "github.com/expr-lang/expr/checker/nature"
|
||||
"github.com/expr-lang/expr/vm"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
. "github.com/hanzoai/expr/checker/nature"
|
||||
"github.com/hanzoai/expr/vm"
|
||||
)
|
||||
|
||||
func FieldIndex(c *Cache, env Nature, node ast.Node) (bool, []int, string) {
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr/checker"
|
||||
"github.com/expr-lang/expr/test/mock"
|
||||
"github.com/hanzoai/expr/checker"
|
||||
"github.com/hanzoai/expr/test/mock"
|
||||
)
|
||||
|
||||
func TestTypedFuncIndex(t *testing.T) {
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
"github.com/expr-lang/expr/builtin"
|
||||
"github.com/expr-lang/expr/internal/deref"
|
||||
"github.com/hanzoai/expr/builtin"
|
||||
"github.com/hanzoai/expr/internal/deref"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -3,7 +3,7 @@ package nature
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/expr-lang/expr/internal/deref"
|
||||
"github.com/hanzoai/expr/internal/deref"
|
||||
)
|
||||
|
||||
func fieldName(fieldName string, tag reflect.StructTag) (string, bool) {
|
||||
|
||||
@@ -7,15 +7,15 @@ import (
|
||||
"regexp"
|
||||
"runtime/debug"
|
||||
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/builtin"
|
||||
"github.com/expr-lang/expr/checker"
|
||||
. "github.com/expr-lang/expr/checker/nature"
|
||||
"github.com/expr-lang/expr/conf"
|
||||
"github.com/expr-lang/expr/file"
|
||||
"github.com/expr-lang/expr/parser"
|
||||
. "github.com/expr-lang/expr/vm"
|
||||
"github.com/expr-lang/expr/vm/runtime"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/builtin"
|
||||
"github.com/hanzoai/expr/checker"
|
||||
. "github.com/hanzoai/expr/checker/nature"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
"github.com/hanzoai/expr/file"
|
||||
"github.com/hanzoai/expr/parser"
|
||||
. "github.com/hanzoai/expr/vm"
|
||||
"github.com/hanzoai/expr/vm/runtime"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -4,14 +4,14 @@ import (
|
||||
"math"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/test/mock"
|
||||
"github.com/expr-lang/expr/test/playground"
|
||||
"github.com/expr-lang/expr/vm"
|
||||
"github.com/expr-lang/expr/vm/runtime"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/test/mock"
|
||||
"github.com/hanzoai/expr/test/playground"
|
||||
"github.com/hanzoai/expr/vm"
|
||||
"github.com/hanzoai/expr/vm/runtime"
|
||||
)
|
||||
|
||||
type B struct {
|
||||
|
||||
+4
-4
@@ -4,10 +4,10 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/builtin"
|
||||
"github.com/expr-lang/expr/checker/nature"
|
||||
"github.com/expr-lang/expr/vm/runtime"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/builtin"
|
||||
"github.com/hanzoai/expr/checker/nature"
|
||||
"github.com/hanzoai/expr/vm/runtime"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+3
-3
@@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
. "github.com/expr-lang/expr/checker/nature"
|
||||
"github.com/expr-lang/expr/internal/deref"
|
||||
"github.com/expr-lang/expr/types"
|
||||
. "github.com/hanzoai/expr/checker/nature"
|
||||
"github.com/hanzoai/expr/internal/deref"
|
||||
"github.com/hanzoai/expr/types"
|
||||
)
|
||||
|
||||
// Env returns the Nature of the given environment.
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rivo/tview"
|
||||
|
||||
. "github.com/expr-lang/expr/vm"
|
||||
. "github.com/hanzoai/expr/vm"
|
||||
)
|
||||
|
||||
func StartDebugger(program *Program, env any) {
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
module github.com/expr-lang/expr/debug
|
||||
module github.com/hanzoai/expr/debug
|
||||
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/expr-lang/expr v0.0.0
|
||||
github.com/hanzoai/expr v0.0.0
|
||||
github.com/gdamore/tcell/v2 v2.6.0
|
||||
github.com/rivo/tview v0.0.0-20230814110005-ccc2c8119703
|
||||
)
|
||||
@@ -18,4 +18,4 @@ require (
|
||||
golang.org/x/text v0.12.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/expr-lang/expr => ../
|
||||
replace github.com/hanzoai/expr => ../
|
||||
|
||||
+3
-3
@@ -5,9 +5,9 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/expr-lang/expr/checker/nature"
|
||||
"github.com/expr-lang/expr/conf"
|
||||
"github.com/expr-lang/expr/internal/deref"
|
||||
"github.com/hanzoai/expr/checker/nature"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
"github.com/hanzoai/expr/internal/deref"
|
||||
)
|
||||
|
||||
// Kind can be any of array, map, struct, func, string, int, float, bool or any.
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
. "github.com/expr-lang/expr/docgen"
|
||||
. "github.com/hanzoai/expr/docgen"
|
||||
)
|
||||
|
||||
type Tweet struct {
|
||||
@@ -128,7 +128,7 @@ func TestCreateDoc(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
PkgPath: "github.com/expr-lang/expr/docgen_test",
|
||||
PkgPath: "github.com/hanzoai/expr/docgen_test",
|
||||
}
|
||||
|
||||
assert.Equal(t, expected.Markdown(), doc.Markdown())
|
||||
@@ -199,7 +199,7 @@ func TestCreateDoc_Ambiguous(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
PkgPath: "github.com/expr-lang/expr/docgen_test",
|
||||
PkgPath: "github.com/hanzoai/expr/docgen_test",
|
||||
}
|
||||
|
||||
assert.Equal(t, expected.Markdown(), doc.Markdown())
|
||||
|
||||
@@ -6,16 +6,16 @@ import (
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/builtin"
|
||||
"github.com/expr-lang/expr/checker"
|
||||
"github.com/expr-lang/expr/compiler"
|
||||
"github.com/expr-lang/expr/conf"
|
||||
"github.com/expr-lang/expr/file"
|
||||
"github.com/expr-lang/expr/optimizer"
|
||||
"github.com/expr-lang/expr/parser"
|
||||
"github.com/expr-lang/expr/patcher"
|
||||
"github.com/expr-lang/expr/vm"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/builtin"
|
||||
"github.com/hanzoai/expr/checker"
|
||||
"github.com/hanzoai/expr/compiler"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
"github.com/hanzoai/expr/file"
|
||||
"github.com/hanzoai/expr/optimizer"
|
||||
"github.com/hanzoai/expr/parser"
|
||||
"github.com/hanzoai/expr/patcher"
|
||||
"github.com/hanzoai/expr/vm"
|
||||
)
|
||||
|
||||
// Option for configuring config.
|
||||
|
||||
+9
-9
@@ -11,16 +11,16 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/expr-lang/expr/conf"
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/expr-lang/expr/types"
|
||||
"github.com/expr-lang/expr/vm"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/types"
|
||||
"github.com/hanzoai/expr/vm"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/file"
|
||||
"github.com/expr-lang/expr/test/mock"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/file"
|
||||
"github.com/hanzoai/expr/test/mock"
|
||||
)
|
||||
|
||||
func ExampleEval() {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module github.com/expr-lang/expr
|
||||
module github.com/hanzoai/expr
|
||||
|
||||
go 1.18
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
|
||||
"github.com/expr-lang/expr/internal/deref"
|
||||
"github.com/hanzoai/expr/internal/deref"
|
||||
)
|
||||
|
||||
func TestDeref(t *testing.T) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/spew"
|
||||
"github.com/hanzoai/expr/internal/spew"
|
||||
)
|
||||
|
||||
// custom type to test Stinger interface on non-pointer receiver.
|
||||
|
||||
@@ -67,7 +67,7 @@ import (
|
||||
"testing"
|
||||
"unsafe"
|
||||
|
||||
"github.com/expr-lang/expr/internal/spew"
|
||||
"github.com/hanzoai/expr/internal/spew"
|
||||
)
|
||||
|
||||
// dumpTest is used to describe a test to be performed against the Dump method.
|
||||
|
||||
@@ -27,7 +27,7 @@ package spew_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/expr-lang/expr/internal/spew/testdata"
|
||||
"github.com/hanzoai/expr/internal/spew/testdata"
|
||||
)
|
||||
|
||||
func addCgoDumpTests() {
|
||||
|
||||
@@ -19,7 +19,7 @@ package spew_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/expr-lang/expr/internal/spew"
|
||||
"github.com/hanzoai/expr/internal/spew"
|
||||
)
|
||||
|
||||
type Flag int
|
||||
|
||||
@@ -72,7 +72,7 @@ import (
|
||||
"testing"
|
||||
"unsafe"
|
||||
|
||||
"github.com/expr-lang/expr/internal/spew"
|
||||
"github.com/hanzoai/expr/internal/spew"
|
||||
)
|
||||
|
||||
// formatterTest is used to describe a test to be performed against NewFormatter.
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/spew"
|
||||
"github.com/hanzoai/expr/internal/spew"
|
||||
)
|
||||
|
||||
// spewFunc is used to identify which public function of the spew package or
|
||||
|
||||
@@ -166,7 +166,7 @@ func TestGreater(t *testing.T) {
|
||||
out := &outputT{buf: bytes.NewBuffer(nil)}
|
||||
False(t, Greater(out, currCase.less, currCase.greater))
|
||||
Contains(t, out.buf.String(), currCase.msg)
|
||||
Contains(t, out.helpers, "github.com/expr-lang/expr/internal/testify/assert.Greater")
|
||||
Contains(t, out.helpers, "github.com/hanzoai/expr/internal/testify/assert.Greater")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ func TestGreaterOrEqual(t *testing.T) {
|
||||
out := &outputT{buf: bytes.NewBuffer(nil)}
|
||||
False(t, GreaterOrEqual(out, currCase.less, currCase.greater))
|
||||
Contains(t, out.buf.String(), currCase.msg)
|
||||
Contains(t, out.helpers, "github.com/expr-lang/expr/internal/testify/assert.GreaterOrEqual")
|
||||
Contains(t, out.helpers, "github.com/hanzoai/expr/internal/testify/assert.GreaterOrEqual")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ func TestLess(t *testing.T) {
|
||||
out := &outputT{buf: bytes.NewBuffer(nil)}
|
||||
False(t, Less(out, currCase.greater, currCase.less))
|
||||
Contains(t, out.buf.String(), currCase.msg)
|
||||
Contains(t, out.helpers, "github.com/expr-lang/expr/internal/testify/assert.Less")
|
||||
Contains(t, out.helpers, "github.com/hanzoai/expr/internal/testify/assert.Less")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ func TestLessOrEqual(t *testing.T) {
|
||||
out := &outputT{buf: bytes.NewBuffer(nil)}
|
||||
False(t, LessOrEqual(out, currCase.greater, currCase.less))
|
||||
Contains(t, out.buf.String(), currCase.msg)
|
||||
Contains(t, out.helpers, "github.com/expr-lang/expr/internal/testify/assert.LessOrEqual")
|
||||
Contains(t, out.helpers, "github.com/hanzoai/expr/internal/testify/assert.LessOrEqual")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ func TestPositive(t *testing.T) {
|
||||
out := &outputT{buf: bytes.NewBuffer(nil)}
|
||||
False(t, Positive(out, currCase.e))
|
||||
Contains(t, out.buf.String(), currCase.msg)
|
||||
Contains(t, out.helpers, "github.com/expr-lang/expr/internal/testify/assert.Positive")
|
||||
Contains(t, out.helpers, "github.com/hanzoai/expr/internal/testify/assert.Positive")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ func TestNegative(t *testing.T) {
|
||||
out := &outputT{buf: bytes.NewBuffer(nil)}
|
||||
False(t, Negative(out, currCase.e))
|
||||
Contains(t, out.buf.String(), currCase.msg)
|
||||
Contains(t, out.helpers, "github.com/expr-lang/expr/internal/testify/assert.Negative")
|
||||
Contains(t, out.helpers, "github.com/hanzoai/expr/internal/testify/assert.Negative")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated with github.com/expr-lang/expr/internal/_codegen; DO NOT EDIT.
|
||||
// Code generated with github.com/hanzoai/expr/internal/_codegen; DO NOT EDIT.
|
||||
|
||||
package assert
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated with github.com/expr-lang/expr/internal/_codegen; DO NOT EDIT.
|
||||
// Code generated with github.com/hanzoai/expr/internal/_codegen; DO NOT EDIT.
|
||||
|
||||
package assert
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ import (
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/expr-lang/expr/internal/spew"
|
||||
"github.com/hanzoai/expr/internal/spew"
|
||||
|
||||
"github.com/expr-lang/expr/internal/difflib"
|
||||
"github.com/hanzoai/expr/internal/difflib"
|
||||
)
|
||||
|
||||
//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_format.go.tmpl"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
// import (
|
||||
// "testing"
|
||||
// "github.com/expr-lang/expr/internal/testify/assert"
|
||||
// "github.com/hanzoai/expr/internal/testify/assert"
|
||||
// )
|
||||
//
|
||||
// func TestSomething(t *testing.T) {
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
// import (
|
||||
// "testing"
|
||||
// "github.com/expr-lang/expr/internal/testify/assert"
|
||||
// "github.com/hanzoai/expr/internal/testify/assert"
|
||||
// )
|
||||
//
|
||||
// func TestSomething(t *testing.T) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
"unsafe"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
)
|
||||
|
||||
type ignoreTestingT struct{}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
// import (
|
||||
// "testing"
|
||||
// "github.com/expr-lang/expr/internal/testify/require"
|
||||
// "github.com/hanzoai/expr/internal/testify/require"
|
||||
// )
|
||||
//
|
||||
// func TestSomething(t *testing.T) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated with github.com/expr-lang/expr/internal/_codegen; DO NOT EDIT.
|
||||
// Code generated with github.com/hanzoai/expr/internal/_codegen; DO NOT EDIT.
|
||||
|
||||
package require
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
url "net/url"
|
||||
time "time"
|
||||
|
||||
assert "github.com/expr-lang/expr/internal/testify/assert"
|
||||
assert "github.com/hanzoai/expr/internal/testify/assert"
|
||||
)
|
||||
|
||||
// Condition uses a Comparison to assert a complex condition.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Code generated with github.com/expr-lang/expr/internal/_codegen; DO NOT EDIT.
|
||||
// Code generated with github.com/hanzoai/expr/internal/_codegen; DO NOT EDIT.
|
||||
|
||||
package require
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
url "net/url"
|
||||
time "time"
|
||||
|
||||
assert "github.com/expr-lang/expr/internal/testify/assert"
|
||||
assert "github.com/hanzoai/expr/internal/testify/assert"
|
||||
)
|
||||
|
||||
// Condition uses a Comparison to assert a complex condition.
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/file"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/file"
|
||||
)
|
||||
|
||||
var errorType = reflect.TypeOf((*error)(nil)).Elem()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package optimizer
|
||||
|
||||
import (
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
)
|
||||
|
||||
type filterFirst struct{}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package optimizer
|
||||
|
||||
import (
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
)
|
||||
|
||||
type filterLast struct{}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package optimizer
|
||||
|
||||
import (
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
)
|
||||
|
||||
type filterLen struct{}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package optimizer
|
||||
|
||||
import (
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
)
|
||||
|
||||
type filterMap struct{}
|
||||
|
||||
@@ -3,11 +3,11 @@ package optimizer_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/expr-lang/expr/optimizer"
|
||||
"github.com/expr-lang/expr/parser"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/optimizer"
|
||||
"github.com/hanzoai/expr/parser"
|
||||
)
|
||||
|
||||
func TestOptimize_filter_map(t *testing.T) {
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@ package optimizer
|
||||
import (
|
||||
"math"
|
||||
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/file"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/file"
|
||||
)
|
||||
|
||||
type fold struct {
|
||||
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/expr-lang/expr/optimizer"
|
||||
"github.com/expr-lang/expr/parser"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/optimizer"
|
||||
"github.com/hanzoai/expr/parser"
|
||||
)
|
||||
|
||||
func TestOptimize_constant_folding(t *testing.T) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package optimizer
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
)
|
||||
|
||||
type inArray struct{}
|
||||
|
||||
@@ -3,7 +3,7 @@ package optimizer
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
)
|
||||
|
||||
type inRange struct{}
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/conf"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
)
|
||||
|
||||
func Optimize(node *Node, config *conf.Config) error {
|
||||
|
||||
@@ -5,15 +5,15 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/checker"
|
||||
"github.com/expr-lang/expr/conf"
|
||||
"github.com/expr-lang/expr/optimizer"
|
||||
"github.com/expr-lang/expr/parser"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/checker"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
"github.com/hanzoai/expr/optimizer"
|
||||
"github.com/hanzoai/expr/parser"
|
||||
)
|
||||
|
||||
func TestOptimize(t *testing.T) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package optimizer
|
||||
|
||||
import (
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/parser/operator"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/parser/operator"
|
||||
)
|
||||
|
||||
/*
|
||||
|
||||
@@ -3,7 +3,7 @@ package optimizer
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
)
|
||||
|
||||
type sumArray struct{}
|
||||
|
||||
@@ -3,14 +3,14 @@ package optimizer_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/optimizer"
|
||||
"github.com/expr-lang/expr/parser"
|
||||
"github.com/expr-lang/expr/vm"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/optimizer"
|
||||
"github.com/hanzoai/expr/parser"
|
||||
"github.com/hanzoai/expr/vm"
|
||||
)
|
||||
|
||||
func BenchmarkSumArray(b *testing.B) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package optimizer
|
||||
|
||||
import (
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
)
|
||||
|
||||
type sumMap struct{}
|
||||
|
||||
@@ -3,12 +3,12 @@ package optimizer_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/optimizer"
|
||||
"github.com/expr-lang/expr/parser"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/optimizer"
|
||||
"github.com/hanzoai/expr/parser"
|
||||
)
|
||||
|
||||
func TestOptimize_sum_map(t *testing.T) {
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/expr-lang/expr/file"
|
||||
"github.com/expr-lang/expr/internal/ring"
|
||||
"github.com/hanzoai/expr/file"
|
||||
"github.com/hanzoai/expr/internal/ring"
|
||||
)
|
||||
|
||||
const ringChunkSize = 10
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/file"
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
. "github.com/expr-lang/expr/parser/lexer"
|
||||
"github.com/hanzoai/expr/file"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
. "github.com/hanzoai/expr/parser/lexer"
|
||||
)
|
||||
|
||||
func TestLex(t *testing.T) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package lexer
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/expr-lang/expr/parser/utils"
|
||||
"github.com/hanzoai/expr/parser/utils"
|
||||
)
|
||||
|
||||
type stateFn func(*Lexer) stateFn
|
||||
|
||||
@@ -3,7 +3,7 @@ package lexer
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/expr-lang/expr/file"
|
||||
"github.com/hanzoai/expr/file"
|
||||
)
|
||||
|
||||
type Kind string
|
||||
|
||||
+7
-7
@@ -8,13 +8,13 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/builtin"
|
||||
"github.com/expr-lang/expr/conf"
|
||||
"github.com/expr-lang/expr/file"
|
||||
. "github.com/expr-lang/expr/parser/lexer"
|
||||
"github.com/expr-lang/expr/parser/operator"
|
||||
"github.com/expr-lang/expr/parser/utils"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/builtin"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
"github.com/hanzoai/expr/file"
|
||||
. "github.com/hanzoai/expr/parser/lexer"
|
||||
"github.com/hanzoai/expr/parser/operator"
|
||||
"github.com/hanzoai/expr/parser/utils"
|
||||
)
|
||||
|
||||
type arg byte
|
||||
|
||||
@@ -5,12 +5,12 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/conf"
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
. "github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/parser"
|
||||
. "github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/parser"
|
||||
)
|
||||
|
||||
func TestParse(t *testing.T) {
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/builtin"
|
||||
"github.com/expr-lang/expr/checker/nature"
|
||||
"github.com/expr-lang/expr/conf"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/builtin"
|
||||
"github.com/hanzoai/expr/checker/nature"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
)
|
||||
|
||||
type OperatorOverloading struct {
|
||||
|
||||
@@ -3,10 +3,10 @@ package value
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/vm"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/vm"
|
||||
)
|
||||
|
||||
func Benchmark_valueAdd(b *testing.B) {
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/expr-lang/expr/conf"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
"github.com/hanzoai/expr/conf"
|
||||
)
|
||||
|
||||
// ValueGetter is a Patcher that allows custom types to be represented as standard go values for use with expr.
|
||||
|
||||
@@ -3,9 +3,9 @@ package value_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/patcher/value"
|
||||
"github.com/expr-lang/expr/vm"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/patcher/value"
|
||||
"github.com/hanzoai/expr/vm"
|
||||
)
|
||||
|
||||
type myInt struct {
|
||||
|
||||
@@ -3,10 +3,10 @@ package value
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/vm"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/vm"
|
||||
)
|
||||
|
||||
type customInt struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package patcher
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
)
|
||||
|
||||
// WithContext adds WithContext.Name argument to all functions calls with a context.Context argument.
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/patcher"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/patcher"
|
||||
)
|
||||
|
||||
func TestWithContext(t *testing.T) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package patcher
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/expr-lang/expr/ast"
|
||||
"github.com/hanzoai/expr/ast"
|
||||
)
|
||||
|
||||
// WithTimezone passes Location to date() and now() functions.
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/hanzoai/expr"
|
||||
)
|
||||
|
||||
func TestWithTimezone_date(t *testing.T) {
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
module github.com/expr-lang/expr/repl
|
||||
module github.com/hanzoai/expr/repl
|
||||
|
||||
go 1.20
|
||||
|
||||
require (
|
||||
github.com/bettercap/readline v0.0.0-20210228151553-655e48bcb7bf
|
||||
github.com/expr-lang/expr v1.13.0
|
||||
github.com/expr-lang/expr/debug v0.0.0
|
||||
github.com/hanzoai/expr v1.13.0
|
||||
github.com/hanzoai/expr/debug v0.0.0
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -21,6 +21,6 @@ require (
|
||||
golang.org/x/text v0.12.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/expr-lang/expr => ../
|
||||
replace github.com/hanzoai/expr => ../
|
||||
|
||||
replace github.com/expr-lang/expr/debug => ../debug
|
||||
replace github.com/hanzoai/expr/debug => ../debug
|
||||
|
||||
+5
-5
@@ -6,14 +6,14 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/expr-lang/expr/test/fuzz"
|
||||
"github.com/hanzoai/expr/test/fuzz"
|
||||
|
||||
"github.com/bettercap/readline"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/builtin"
|
||||
"github.com/expr-lang/expr/debug"
|
||||
"github.com/expr-lang/expr/vm"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/builtin"
|
||||
"github.com/hanzoai/expr/debug"
|
||||
"github.com/hanzoai/expr/vm"
|
||||
)
|
||||
|
||||
var keywords = []string{
|
||||
|
||||
@@ -3,9 +3,9 @@ package bench_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/expr-lang/expr/vm"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/vm"
|
||||
)
|
||||
|
||||
type Env struct {
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/test/coredns"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/test/coredns"
|
||||
)
|
||||
|
||||
func TestCoreDNS(t *testing.T) {
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/test/crowdsec"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/test/crowdsec"
|
||||
)
|
||||
|
||||
func TestCrowdsec(t *testing.T) {
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/hanzoai/expr"
|
||||
)
|
||||
|
||||
func TestDeref_binary(t *testing.T) {
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
)
|
||||
|
||||
var examples []CodeBlock
|
||||
|
||||
@@ -3,7 +3,7 @@ package fuzz
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/hanzoai/expr"
|
||||
)
|
||||
|
||||
func NewEnv() map[string]any {
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/hanzoai/expr"
|
||||
)
|
||||
|
||||
//go:embed fuzz_corpus.txt
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/builtin"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/builtin"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
)
|
||||
|
||||
var updateFlag = flag.Bool("update", false, "Drop failing lines from examples.txt")
|
||||
|
||||
@@ -3,10 +3,10 @@ package interface_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/hanzoai/expr"
|
||||
)
|
||||
|
||||
type Bar interface {
|
||||
|
||||
@@ -3,8 +3,8 @@ package interface_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/internal/testify/assert"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/internal/testify/assert"
|
||||
)
|
||||
|
||||
type StoreInterface interface {
|
||||
|
||||
@@ -3,8 +3,8 @@ package issue_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
)
|
||||
|
||||
func TestIssue461(t *testing.T) {
|
||||
|
||||
@@ -3,8 +3,8 @@ package issue_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
)
|
||||
|
||||
type Foo interface {
|
||||
|
||||
@@ -3,8 +3,8 @@ package issue_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
)
|
||||
|
||||
func TestIssue723(t *testing.T) {
|
||||
|
||||
@@ -3,8 +3,8 @@ package issue_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
)
|
||||
|
||||
type ModeEnum int
|
||||
|
||||
@@ -3,8 +3,8 @@ package issue_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
)
|
||||
|
||||
func TestIssue739(t *testing.T) {
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
)
|
||||
|
||||
type X struct{}
|
||||
|
||||
@@ -3,8 +3,8 @@ package issue_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
)
|
||||
|
||||
func TestIssue785(t *testing.T) {
|
||||
|
||||
@@ -3,8 +3,8 @@ package issue_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/expr-lang/expr"
|
||||
"github.com/expr-lang/expr/internal/testify/require"
|
||||
"github.com/hanzoai/expr"
|
||||
"github.com/hanzoai/expr/internal/testify/require"
|
||||
)
|
||||
|
||||
func TestEnvFieldMethods(t *testing.T) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user