diff options
author | flywind <xzsflywind@gmail.com> | 2021-03-05 02:37:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-04 19:37:12 +0100 |
commit | 81889fb84ce9fb185bdbf4d4f657c80cf94b23fc (patch) | |
tree | 8e1e886ede34fdb127055900310193136a435773 /tests | |
parent | e1cc3b83fba0bc66790959d3cd84d70464c31e4f (diff) | |
download | Nim-81889fb84ce9fb185bdbf4d4f657c80cf94b23fc.tar.gz |
reuse jsffi in json module (#17165)
* remove unnecessary when statement * remove outdated codes * reuse jsffi * move js json coverage
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stdlib/t15835.nim | 7 | ||||
-rw-r--r-- | tests/stdlib/talgorithm.nim | 3 | ||||
-rw-r--r-- | tests/stdlib/tjson_unmarshall.nim | 3 |
3 files changed, 10 insertions, 3 deletions
diff --git a/tests/stdlib/t15835.nim b/tests/stdlib/t15835.nim index bddfa87aa..ba3405780 100644 --- a/tests/stdlib/t15835.nim +++ b/tests/stdlib/t15835.nim @@ -1,4 +1,9 @@ -import json +discard """ + targets: "c js" +""" + + +import std/json type Foo = object diff --git a/tests/stdlib/talgorithm.nim b/tests/stdlib/talgorithm.nim index 47a8d327b..fecd85820 100644 --- a/tests/stdlib/talgorithm.nim +++ b/tests/stdlib/talgorithm.nim @@ -1,9 +1,10 @@ discard """ + targets: "c js" output:'''@["3", "2", "1"] ''' """ #12928,10456 -import sequtils, algorithm, json +import std/[sequtils, algorithm, json] proc test() = try: diff --git a/tests/stdlib/tjson_unmarshall.nim b/tests/stdlib/tjson_unmarshall.nim index 69bed3ac9..4353d1ee2 100644 --- a/tests/stdlib/tjson_unmarshall.nim +++ b/tests/stdlib/tjson_unmarshall.nim @@ -1,4 +1,5 @@ discard """ + targets: "c js" output: ''' Original: (kind: P, pChildren: @[(kind: Text, textStr: "mychild"), (kind: Br)]) jsonNode: {"kind":"P","pChildren":[{"kind":"Text","textStr":"mychild"},{"kind":"Br"}]} @@ -6,7 +7,7 @@ Reversed: (kind: P, pChildren: @[(kind: Text, textStr: "mychild"), (kind: Br)]) ''' """ -import json +import std/json type ContentNodeKind* = enum |