diff options
| author | historia <gravel.justness270@slmail.me> | 2024-08-11 06:09:42 -0400 |
|---|---|---|
| committer | historia <gravel.justness270@slmail.me> | 2024-08-11 06:09:42 -0400 |
| commit | e5c80a22c35a5745ae957b8e84da42abd0c41d4d (patch) | |
| tree | b8f6f03e45c91fb197be5ca64ce14cc69a4cb184 /tests | |
| parent | 63e113de4afe54c47789d4ce20b26a1665880c2a (diff) | |
| download | soon-e5c80a22c35a5745ae957b8e84da42abd0c41d4d.tar.gz | |
Feature: One-sided conditions like -(Aug 15 2025)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/tconditionchecker.nim (renamed from tests/tconditions.nim) | 2 | ||||
| -rw-r--r-- | tests/tests.nim | 2 | ||||
| -rw-r--r-- | tests/ttypechecker.nim | 18 |
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" |
