summary refs log tree commit diff stats
path: root/tests/stdlib/tunittestpass.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdlib/tunittestpass.nim')
-rw-r--r--tests/stdlib/tunittestpass.nim20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/stdlib/tunittestpass.nim b/tests/stdlib/tunittestpass.nim
new file mode 100644
index 000000000..d8de277b7
--- /dev/null
+++ b/tests/stdlib/tunittestpass.nim
@@ -0,0 +1,20 @@
+discard """
+  matrix: "--mm:refc; --mm:orc"
+  targets: "c js"
+"""
+
+
+import unittest
+
+block:
+  check (type(1.0)) is float
+  check type(1.0) is float
+  check (typeof(1)) isnot float
+  check typeof(1) isnot float
+
+  check 1.0 is float
+  check 1 isnot float
+
+  type T = type(0.1)
+  check T is float
+  check T isnot int