From d1f49743a0a00a1156272d174e8b6b5c4bb9acec Mon Sep 17 00:00:00 2001 From: nea Date: Sat, 12 Aug 2023 02:36:05 +0200 Subject: Add hash support --- test/res/test.lisp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/res/test.lisp b/test/res/test.lisp index 19594b3..b5a9f65 100644 --- a/test/res/test.lisp +++ b/test/res/test.lisp @@ -19,3 +19,14 @@ ((test.assert-eq (| true false) true)) ((test.assert-eq (| false true) true)) ((test.assert-eq (| false false) false)))) + +(test.test "Hashes" (seq + (def funnyhash (hash.new :test1 1 :test2 2)) + ((test.assert-eq + (hash.merge funnyhash (hash.new :test1 2)) + (hash.new :test1 2 :test2 2))) + ((test.assert-eq funnyhash (hash.new :test1 1 :test2 2))) + ((test.assert-eq (hash.get funnyhash :test1) 1)) + ((test.assert-eq (hash.get funnyhash :tesst3) nil)) + )) + -- cgit