diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-18 00:07:56 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-18 00:07:56 +0300 |
| commit | 33fcf676128426f2ac9a4730d63fa481bb351518 (patch) | |
| tree | fb8553e58fb3553e1b1da334b5a4d54e254f2340 /tests/ptr | |
| parent | 0d4e9292d85a169f881926556992d4ae12dcb6f4 (diff) | |
| download | ek-33fcf676128426f2ac9a4730d63fa481bb351518.tar.gz ek-33fcf676128426f2ac9a4730d63fa481bb351518.zip | |
make check works again
Diffstat (limited to 'tests/ptr')
| -rw-r--r-- | tests/ptr/ptr.ek | 30 | ||||
| -rw-r--r-- | tests/ptr/source.mk | 1 |
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/ptr/ptr.ek b/tests/ptr/ptr.ek new file mode 100644 index 0000000..86f413c --- /dev/null +++ b/tests/ptr/ptr.ek @@ -0,0 +1,30 @@ +typedef bool {} + +typedef i27 { + cmp![]; + eq(i27 a, i27 b => bool) { + return a == b; + } +} + +typedef ptr { + cmp![]; + eq(ptr a, ptr b => bool) { + return a == b; + } +} + +typedef test[cmp T] {} + +define cmp[] { + eq(cmp, cmp => bool); +} + +main() +{ + const a = test![i27]{}; + 20.eq(20); + + const b = test![*i27]{}; + a&.eq(a&); +} diff --git a/tests/ptr/source.mk b/tests/ptr/source.mk new file mode 100644 index 0000000..abdd059 --- /dev/null +++ b/tests/ptr/source.mk @@ -0,0 +1 @@ +SIMPLE += ptr |
