1
0
mirror of https://github.com/MontFerret/ferret.git synced 2026-05-22 10:15:21 +02:00

Added .Clone() method to runtime Value

This commit is contained in:
Tim Voronov
2018-09-27 11:53:26 -04:00
parent eeee30856e
commit 69a7295da5
14 changed files with 80 additions and 11 deletions
+5 -5
View File
@@ -1288,11 +1288,11 @@ func TestFunctionCall(t *testing.T) {
So(string(out), ShouldEqual, `"int"`)
})
Convey("Should compile SLEEP(10) RETURN 1", t, func() {
Convey("Should compile WAIT(10) RETURN 1", t, func() {
c := compiler.New()
prog, err := c.Compile(`
SLEEP(10)
WAIT(10)
RETURN 1
`)
@@ -1305,13 +1305,13 @@ func TestFunctionCall(t *testing.T) {
So(string(out), ShouldEqual, `1`)
})
Convey("Should compile LET duration = 10 SLEEP(duration) RETURN 1", t, func() {
Convey("Should compile LET duration = 10 WAIT(duration) RETURN 1", t, func() {
c := compiler.New()
prog, err := c.Compile(`
LET duration = 10
SLEEP(duration)
WAIT(duration)
RETURN 1
`)
@@ -1332,7 +1332,7 @@ func TestFunctionCall(t *testing.T) {
FOR i IN [1, 2, 3, 4]
LET duration = 10
SLEEP(duration)
WAIT(duration)
RETURN i * 2
`)