Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Benchmark for @mingwho's #227
  • Loading branch information
odino committed Jun 6, 2019
1 parent 05bfc0e commit e1201df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Expand Up @@ -5,7 +5,9 @@ fmt:
go fmt ./...
build:
docker build -t abs .
test:
bench:
go test ./... -bench=.
test: bench
# The -vet=off is as YOLO as it gets
go test ./... -vet=off
test_verbose:
Expand Down
7 changes: 7 additions & 0 deletions evaluator/evaluator_test.go
Expand Up @@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"runtime"
"strconv"
"strings"
"testing"

Expand Down Expand Up @@ -185,6 +186,12 @@ func TestLazyEvaluation(t *testing.T) {
}
}

func BenchmarkLazyEvaluation(b *testing.B) {
for i := 0; i < b.N; i++ {
testEval(`false && 1..` + strconv.Itoa(i))
}
}

func TestBangOperator(t *testing.T) {
tests := []struct {
input string
Expand Down

0 comments on commit e1201df

Please sign in to comment.