From c767b02f5a447c485cc58dc90e8f5ba9e7ab25ae Mon Sep 17 00:00:00 2001 From: CrossNox Date: Sun, 27 Nov 2022 20:00:17 -0300 Subject: [PATCH] add test --- test/rustint/core_test.clj | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/rustint/core_test.clj b/test/rustint/core_test.clj index d29ea3a..3f8fce3 100644 --- a/test/rustint/core_test.clj +++ b/test/rustint/core_test.clj @@ -608,3 +608,21 @@ ) ) ) + +(deftest test-cargar-const-en-tabla-01 + (testing "Test 01 cargar-const-en-tabla" + (is (= + (cargar-const-en-tabla [ + (symbol ";") ; simb-actual + (list 'fn 'main (symbol "(") (symbol ")") (symbol "{") 'println! (symbol "(") "{}" (symbol ",") 'TRES (symbol ")") (symbol "}")) ; simb-no-parseados-aun + ['use 'std (symbol "::") 'io (symbol ";") 'const 'TRES (symbol ":") 'i64 (symbol "=") 3] ; simb-ya-parseados + 8 ; estado + [[0] [['io ['lib '()] 0]]] ; contexto + 0 ; prox-var + [['CAL 0] 'HLT] ; bytecode + [] ; mapa-regs-de-act + ]) + [(symbol ";") (fn main ( ) { println! ( "{}" , TRES ) }) ['use 'std (symbol "::") 'io (symbol ";") 'const 'TRES (symbol ":") 'i64 (symbol "=") 3] 8 [[0] [[io [lib ()] 0]]] 0 [[CAL 0] HLT] []] + ) + ) +)