Skip to content

Commit

Permalink
test: update test_llvm
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranavchiku committed Jul 12, 2024
1 parent 5c32250 commit 651b482
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lfortran/tests/test_llvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ end function)";
LCompilers::SymbolTable::reset_global_counter();
LCompilers::ASR::TranslationUnit_t* asr = TRY(LCompilers::LFortran::ast_to_asr(al, *tu,
diagnostics, nullptr, false, compiler_options));
CHECK(LCompilers::pickle(*asr) == "(TranslationUnit (SymbolTable 1 {f: (Function (SymbolTable 2 {f: (Variable 2 f [] ReturnVar () () Default (Integer 4) () Source Public Required .false.)}) f (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false.) [] [] [(Assignment (Var 2 f) (IntegerConstant 5 (Integer 4)) ())] (Var 2 f) Public .false. .false. ())}) [])");
CHECK(LCompilers::pickle(*asr) == "(TranslationUnit (SymbolTable 1 {f: (Function (SymbolTable 2 {f: (Variable 2 f [] ReturnVar () () Default (Integer 4) () Source Public Required .false.)}) f (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false.) [] [] [(Assignment (Var 2 f) (IntegerConstant 5 (Integer 4) Decimal) ())] (Var 2 f) Public .false. .false. ())}) [])");

// ASR -> LLVM
LCompilers::LLVMEvaluator e;
Expand Down Expand Up @@ -418,7 +418,7 @@ end function)";
// AST -> ASR
LCompilers::ASR::TranslationUnit_t* asr = TRY(LCompilers::LFortran::ast_to_asr(al, *tu,
diagnostics, nullptr, false, compiler_options));
CHECK(LCompilers::pickle(*asr) == "(TranslationUnit (SymbolTable 3 {f: (Function (SymbolTable 4 {f: (Variable 4 f [] ReturnVar () () Default (Integer 4) () Source Public Required .false.)}) f (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false.) [] [] [(Assignment (Var 4 f) (IntegerConstant 4 (Integer 4)) ())] (Var 4 f) Public .false. .false. ())}) [])");
CHECK(LCompilers::pickle(*asr) == "(TranslationUnit (SymbolTable 3 {f: (Function (SymbolTable 4 {f: (Variable 4 f [] ReturnVar () () Default (Integer 4) () Source Public Required .false.)}) f (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false.) [] [] [(Assignment (Var 4 f) (IntegerConstant 4 (Integer 4) Decimal) ())] (Var 4 f) Public .false. .false. ())}) [])");
// ASR -> LLVM
LCompilers::LLVMEvaluator e;
LCompilers::PassManager lpm;
Expand Down

0 comments on commit 651b482

Please sign in to comment.