Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Vipul-Cariappa committed Jun 15, 2024
1 parent 74795a7 commit adeef61
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/lpython/tests/test_llvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,23 @@ def my_concat(x: str, y: str) -> str:
CHECK(std::strcmp(r.result.str, "Python REPL") == 0);
}

TEST_CASE("PythonCompiler Array 1") {
CompilerOptions cu;
cu.po.disable_main = true;
cu.emit_debug_line_column = false;
cu.generate_object_code = false;
cu.interactive = true;
cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
PythonCompiler e(cu);
LCompilers::Result<PythonCompiler::EvalResult>
r = e.evaluate2("i: i32[10]");
CHECK(r.ok);
CHECK(r.result.type == PythonCompiler::EvalResult::none);
r = e.evaluate2("print(i)");
CHECK(r.ok);
CHECK(r.result.type == PythonCompiler::EvalResult::statement);
}

TEST_CASE("PythonCompiler asr verify 1") {
CompilerOptions cu;
cu.po.disable_main = true;
Expand Down

0 comments on commit adeef61

Please sign in to comment.