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

Function test_ubound_ok

std/src/arrays.rs:319–337  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

317
318 #[test]
319 fn test_ubound_ok() {
320 Tester::default()
321 .run("DIM x(10): result = UBOUND(x)")
322 .expect_var("result", 9i32)
323 .expect_array("x", ExprType::Integer, &[10], vec![])
324 .check();
325
326 Tester::default()
327 .run("DIM x(10, 20): result = UBOUND(x, 1)")
328 .expect_var("result", 9i32)
329 .expect_array("x", ExprType::Integer, &[10, 20], vec![])
330 .check();
331
332 Tester::default()
333 .run("DIM x(10, 20): result = UBOUND(x, 2.1)")
334 .expect_var("result", 19i32)
335 .expect_array("x", ExprType::Integer, &[10, 20], vec![])
336 .check();
337 }
338
339 #[test]
340 fn test_ubound_errors() {

Callers

nothing calls this directly

Calls 4

expect_arrayMethod · 0.80
expect_varMethod · 0.80
checkMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected