Skip to content

Commit

Permalink
Merge pull request #50 from esell/runtime-tests2
Browse files Browse the repository at this point in the history
add unit tests for runtime/core - function
  • Loading branch information
ziflex authored Oct 5, 2018
2 parents 631f452 + 0b6639f commit 1b2a765
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pkg/runtime/core/function_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package core_test

import (
"testing"

"github.com/MontFerret/ferret/pkg/runtime/core"
"github.com/MontFerret/ferret/pkg/runtime/values"
. "github.com/smartystreets/goconvey/convey"
)

func TestValidateArgs(t *testing.T) {
Convey("Should match", t, func() {
a := []core.Value{values.NewInt(1), values.NewInt(2)}

e := core.ValidateArgs(a, 1, 2)
So(e, ShouldBeNil)

e = core.ValidateArgs(a, 3, 4)
So(e, ShouldNotBeNil)
})
}

0 comments on commit 1b2a765

Please sign in to comment.