diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2019-01-08 18:37:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-08 18:37:25 -0800 |
commit | 6ce3949c8aa489d268f272829d03edab175bfc7a (patch) | |
tree | 777513c9aef3896204b8dfd9cea40517d57d2ce7 /tests/collections | |
parent | bf3a308e86e7c5999855546962aed564218a8121 (diff) | |
download | Nim-6ce3949c8aa489d268f272829d03edab175bfc7a.tar.gz |
add `isNamedTuple`; make $(1, 2) be (1, 2) instead of (Field0: 1, Field1: 2) which leaked implementation detail (#10070)
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of leaking implementation detail (Field0: 1, Field1: 2) fixes this: #8670 (comment) /cc @alehander42 @Vindaar @mratsim * Note: isNamedTuple is useful in other places, eg #10010 (comment) * move isNamedTuple to helpers.nim to avoid exposing new symbol to system.nim * remove workaround in tests/vm/tissues.nim failing test now that #10218 was makes it work
Diffstat (limited to 'tests/collections')
-rw-r--r-- | tests/collections/tcollections_to_string.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/collections/tcollections_to_string.nim b/tests/collections/tcollections_to_string.nim index 0c4f1e91c..686b9916b 100644 --- a/tests/collections/tcollections_to_string.nim +++ b/tests/collections/tcollections_to_string.nim @@ -9,9 +9,9 @@ import lists import critbits # Tests for tuples -doAssert $(1, 2, 3) == "(Field0: 1, Field1: 2, Field2: 3)" -doAssert $("1", "2", "3") == """(Field0: "1", Field1: "2", Field2: "3")""" -doAssert $('1', '2', '3') == """(Field0: '1', Field1: '2', Field2: '3')""" +doAssert $(1, 2, 3) == "(1, 2, 3)" +doAssert $("1", "2", "3") == """("1", "2", "3")""" +doAssert $('1', '2', '3') == """('1', '2', '3')""" # Tests for seqs doAssert $(@[1, 2, 3]) == "@[1, 2, 3]" |