Move from Jansson to JV - proper freeing of memory

A few more tests, now passes valgrind.
This commit is contained in:
Stephen Dolan committed 2012-09-02 21:45:52 +01:00
1 parent 9da3e0d373
commit 4f747e6fff
8 files changed
+141 -21

No files matched your search

+39 -6
View File
@@ -76,6 +76,27 @@ null
2
3
1,1
[]
1
1
[.]
[2]
[[2]]
[[2]]
[3]
[[2]]
[{}]
[2]
[{}]
[.[]]
["a"]
["a"]
[(.,1),((.,.[]),(2,3))]
["a","b"]
[["a","b"],1,["a","b"],"a","b",2,3]
@@ -118,7 +139,7 @@ null
1+1
null
2.0
2
.+4
15
@@ -143,11 +164,17 @@ def f: (1000,2000); f
1000
2000
# test backtracking through function calls and returns
# this test is *evil*
[[20,10][1,0] as $x | def f: (100,200) as $y | def g: [$x + $y, .]; . + $x | g; f[0] | [f][0][1] | f]
"woo, testing!"
[[110.0, 130.0], [210.0, 130.0], [110.0, 230.0], [210.0, 230.0], [120.0, 160.0], [220.0, 160.0], [120.0, 260.0], [220.0, 260.0]]
([1,2] + [4,5])
[1,2,3]
[1,2,4,5]
true
[1]
true
[1,2,3]
[5,6]
[1,2,3]
def f(x): x | x; f([.], . + [42])
[1,2,3]
@@ -160,3 +187,9 @@ def f(x): x | x; f([.], . + [42])
def id(x):x; 2000 as $x | def f(x):1 as $x | id([$x, x, x]); def g(x): 100 as $x | f($x,$x+x); g($x)
"more testing"
[1,100,2100.0,100,2100.0]
# test backtracking through function calls and returns
# this test is *evil*
[[20,10][1,0] as $x | def f: (100,200) as $y | def g: [$x + $y, .]; . + $x | g; f[0] | [f][0][1] | f]
"woo, testing!"
[[110.0, 130.0], [210.0, 130.0], [110.0, 230.0], [210.0, 230.0], [120.0, 160.0], [220.0, 160.0], [120.0, 260.0], [220.0, 260.0]]