MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_run_clears_before_execution_only

Function test_run_clears_before_execution_only

std/src/program.rs:953–967  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

951
952 #[test]
953 fn test_run_clears_before_execution_only() {
954 let program = "DIM a(1) AS INTEGER: a(0) = 123";
955 let mut t = Tester::default().set_program(Some("untouched.bas"), program);
956 t.run("DIM a(1) AS STRING: RUN")
957 .expect_array_simple("a", ExprType::Integer, vec![123.into()])
958 .expect_clear()
959 .expect_program(Some("untouched.bas"), program)
960 .check();
961 t.run("RUN")
962 .expect_array_simple("a", ExprType::Integer, vec![123.into()])
963 .expect_clear()
964 .expect_clear()
965 .expect_program(Some("untouched.bas"), program)
966 .check();
967 }
968
969 #[test]
970 fn test_run_something_that_exits() {

Callers

nothing calls this directly

Calls 6

set_programMethod · 0.80
expect_programMethod · 0.80
expect_clearMethod · 0.80
expect_array_simpleMethod · 0.80
checkMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected