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] + [] + ] + ) + ) + ) +)