From 97a7b741fb329d78df17b298c535833a1b720b89 Mon Sep 17 00:00:00 2001 From: CrossNox Date: Sun, 27 Nov 2022 20:33:46 -0300 Subject: [PATCH] add test --- test/rustint/core_test.clj | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/test/rustint/core_test.clj b/test/rustint/core_test.clj index d5013ff..afbdb27 100644 --- a/test/rustint/core_test.clj +++ b/test/rustint/core_test.clj @@ -636,3 +636,32 @@ ) ) ) + +(deftest test-cargar-const-en-tabla-02 + (testing "Test 02 cargar-const-en-tabla" + (is (= + (cargar-const-en-tabla [ + (symbol ";") + (list 'fn 'main (symbol "(") (symbol ")") (symbol "{") 'println! (symbol "(") "{}" (symbol ",") 'TRES (symbol ")") (symbol "}")) + ['use 'std (symbol "::") 'io (symbol ";") 'const 'TRES (symbol ":") 'i64 (symbol "=") 3] + :sin-errores + [[0] [['io ['lib '()] 0]]] + 0 + [['CAL 0] 'HLT] + [] + ] + ) + [ + (symbol ";") + ('fn 'main (symbol "(") (symbol ")") (symbol "{") 'println! (symbol "(") "{}" (symbol ",") 'TRES (symbol ")") (symbol "}")) + ['use 'std (symbol "::") 'io (symbol ";") 'const 'TRES (symbol ":") 'i64 (symbol "=") 3] + :sin-errores + [[0] [['io ['lib '()] 0] ['TRES ['const 'i64] 3]]] + 0 + [['CAL 0] 'HLT] + [] + ] + ) + ) + ) +)