From f87fc7996ca09eb5c90986d5116b08fdc3714db1 Mon Sep 17 00:00:00 2001 From: George Lemon Date: Thu, 6 Jun 2024 09:15:11 +0300 Subject: [PATCH] Extensibles - Add tests Signed-off-by: George Lemon --- tests/extensibleModule.nim | 5 +++++ tests/test2.nim | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/extensibleModule.nim create mode 100644 tests/test2.nim diff --git a/tests/extensibleModule.nim b/tests/extensibleModule.nim new file mode 100644 index 0000000..9f99d74 --- /dev/null +++ b/tests/extensibleModule.nim @@ -0,0 +1,5 @@ +import voodoo/extensibles + +type + Cardinal* {.extensible.} = enum + north, west \ No newline at end of file diff --git a/tests/test2.nim b/tests/test2.nim new file mode 100644 index 0000000..31ecd79 --- /dev/null +++ b/tests/test2.nim @@ -0,0 +1,11 @@ +import unittest +import voodoo/extensibles + +extendEnum Cardinal: + south + east + +import ./extensibleModule + +assert compiles Cardinal.south +assert compiles Cardinal.east \ No newline at end of file