aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/tconditionchecker.nim (renamed from tests/tconditions.nim)2
-rw-r--r--tests/tests.nim2
-rw-r--r--tests/ttypechecker.nim18
3 files changed, 20 insertions, 2 deletions
diff --git a/tests/tconditions.nim b/tests/tconditionchecker.nim
index a0298e4..f7909b2 100644
--- a/tests/tconditions.nim
+++ b/tests/tconditionchecker.nim
@@ -1,4 +1,4 @@
-import soon/conditions
+import soon/conditionchecker
import std/[unittest]
import std/[times]
diff --git a/tests/tests.nim b/tests/tests.nim
index 5b7f865..45134c0 100644
--- a/tests/tests.nim
+++ b/tests/tests.nim
@@ -1 +1 @@
-include "tconditions.nim"
+include tconditionchecker, ttypechecker
diff --git a/tests/ttypechecker.nim b/tests/ttypechecker.nim
index 5e76c2f..c0fc057 100644
--- a/tests/ttypechecker.nim
+++ b/tests/ttypechecker.nim
@@ -75,3 +75,21 @@ test "Testing typechecker":
for t in ["!@#$","foo",""]:
check checkType(t) == "unknown"
+
+ for t in ["-1", "15-", "-30"]:
+ check checkType(t) == "onesidedday"
+
+ for t in ["-mon", "WED-"]:
+ check checkType(t) == "onesidedweekday"
+
+ for t in ["jan-", "-JUN"]:
+ check checkType(t) == "onesidedmonth"
+
+ for t in ["1984-", "-2025"]:
+ check checkType(t) == "onesidedyear"
+
+ for t in [
+ "(Jan 15)-",
+ "-(January 15 2025)"
+ ]:
+ check checkType(t) == "onesideddategroup"