Skip to content

Commit adeef61

Browse files
add test
1 parent 74795a7 commit adeef61

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/lpython/tests/test_llvm.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,6 +1450,23 @@ def my_concat(x: str, y: str) -> str:
14501450
CHECK(std::strcmp(r.result.str, "Python REPL") == 0);
14511451
}
14521452

1453+
TEST_CASE("PythonCompiler Array 1") {
1454+
CompilerOptions cu;
1455+
cu.po.disable_main = true;
1456+
cu.emit_debug_line_column = false;
1457+
cu.generate_object_code = false;
1458+
cu.interactive = true;
1459+
cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir();
1460+
PythonCompiler e(cu);
1461+
LCompilers::Result<PythonCompiler::EvalResult>
1462+
r = e.evaluate2("i: i32[10]");
1463+
CHECK(r.ok);
1464+
CHECK(r.result.type == PythonCompiler::EvalResult::none);
1465+
r = e.evaluate2("print(i)");
1466+
CHECK(r.ok);
1467+
CHECK(r.result.type == PythonCompiler::EvalResult::statement);
1468+
}
1469+
14531470
TEST_CASE("PythonCompiler asr verify 1") {
14541471
CompilerOptions cu;
14551472
cu.po.disable_main = true;

0 commit comments

Comments
 (0)