summary refs log tree commit diff stats
path: root/tests/fields/tfielditerator.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fields/tfielditerator.nim')
-rw-r--r--tests/fields/tfielditerator.nim46
1 files changed, 0 insertions, 46 deletions
diff --git a/tests/fields/tfielditerator.nim b/tests/fields/tfielditerator.nim
deleted file mode 100644
index 6d15ea05d..000000000
--- a/tests/fields/tfielditerator.nim
+++ /dev/null
@@ -1,46 +0,0 @@
-discard """
-  output: '''
-a char: true
-a char: false
-an int: 5
-an int: 6
-a string: abc
-false
-true
-true
-false
-true
-a: a
-b: b
-x: 5
-y: 6
-z: abc
-'''
-"""
-
-type
-  TMyTuple = tuple[a, b: char, x, y: int, z: string]
-
-proc p(x: char) = echo "a char: ", x <= 'a'
-proc p(x: int) = echo "an int: ", x
-proc p(x: string) = echo "a string: ", x
-
-var x: TMyTuple = ('a', 'b', 5, 6, "abc")
-var y: TMyTuple = ('A', 'b', 5, 9, "abc")
-
-for f in fields(x):
-  p f
-
-for a, b in fields(x, y):
-  echo a == b
-
-for key, val in fieldPairs(x):
-  echo key, ": ", val
-
-assert x != y
-assert x == x
-assert(not (x < x))
-assert x <= x
-assert y < x
-assert y <= x
-