diff options
author | def <dennis@felsin9.de> | 2016-02-02 00:47:11 +0100 |
---|---|---|
committer | def <dennis@felsin9.de> | 2016-02-24 19:03:55 +0100 |
commit | 57897698d18bf56808409c7d52efa394a01bf549 (patch) | |
tree | 5ed8b6c993a0c56ba542150c5ddf66c5341beda2 /tests/closure | |
parent | 129499d8e9c25edea03dc30e4fec09c65d1e7e50 (diff) | |
download | Nim-57897698d18bf56808409c7d52efa394a01bf549.tar.gz |
Fix test cases for JSON object changes
Diffstat (limited to 'tests/closure')
-rw-r--r-- | tests/closure/tclosure4.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/closure/tclosure4.nim b/tests/closure/tclosure4.nim index 10c7cac54..69c076cd5 100644 --- a/tests/closure/tclosure4.nim +++ b/tests/closure/tclosure4.nim @@ -1,13 +1,13 @@ import json, tables, sequtils -proc run(json_params: TTable) = +proc run(json_params: Table) = let json_elems = json_params["files"].elems # These fail compilation. - var files = map(json_elems, proc (x: PJsonNode): string = x.str) - #var files = json_elems.map do (x: PJsonNode) -> string: x.str + var files = map(json_elems, proc (x: JsonNode): string = x.str) + #var files = json_elems.map do (x: JsonNode) -> string: x.str echo "Hey!" when isMainModule: let text = """{"files": ["a", "b", "c"]}""" - run(toTable((text.parseJson).fields)) + run((text.parseJson).fields) |