summary refs log tree commit diff stats
path: root/tests/system
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2020-02-27 01:43:13 -0800
committerGitHub <noreply@github.com>2020-02-27 10:43:13 +0100
commit6a0e87eb387c13f1d6f78e1736c23cdb4a06b504 (patch)
tree34361881f4062eabb459596128979b56eafc8add /tests/system
parent42dad3a836f7eed860f300e68b33d4c0b39bd1f4 (diff)
downloadNim-6a0e87eb387c13f1d6f78e1736c23cdb4a06b504.tar.gz
cleanup Ordinal (#13501)
Diffstat (limited to 'tests/system')
-rw-r--r--tests/system/tsystem_misc.nim17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/system/tsystem_misc.nim b/tests/system/tsystem_misc.nim
index 56af97f36..fff8b7022 100644
--- a/tests/system/tsystem_misc.nim
+++ b/tests/system/tsystem_misc.nim
@@ -193,3 +193,20 @@ block:
     a = {k1}
     b = {k1,k2}
   doAssert a < b
+
+
+block: # Ordinal
+  doAssert int is Ordinal
+  doAssert uint is Ordinal
+  doAssert int64 is Ordinal
+  doAssert uint64 is Ordinal
+  doAssert char is Ordinal
+  type Foo = enum k1, k2
+  doAssert Foo is Ordinal
+  doAssert Foo is SomeOrdinal
+  doAssert enum is SomeOrdinal
+
+  # these fail:
+  # doAssert enum is Ordinal # fails
+  # doAssert Ordinal is SomeOrdinal
+  # doAssert SomeOrdinal is Ordinal