Fix tests
This commit is contained in:
parent
476aa8bfb2
commit
131386632f
@ -986,12 +986,12 @@ fn interpret_program(operations: &Vec<Operation>, queue: &mut Vec<String>, funct
|
||||
if position >= arr.length
|
||||
{
|
||||
//return Err(format!("Attempted an out of bounds write for array {} ({} >= {}) at {}:{}", arr.name, position, arr.length, line, col));
|
||||
return Err(String::from("Attempted array out-of-bounds access"));
|
||||
return Err(String::from("Attempted array out-of-bounds access\n"));
|
||||
}
|
||||
if position < 0
|
||||
{
|
||||
//return Err(format!("Attempted an out of bounds write for array {} ({} < 0) at {}:{}", arr.name, position, line, col));
|
||||
return Err(String::from("Attempted array out-of-bounds access"));
|
||||
return Err(String::from("Attempted array out-of-bounds access\n"));
|
||||
}
|
||||
let data = queue.remove(0);
|
||||
if debug
|
||||
@ -1010,12 +1010,12 @@ fn interpret_program(operations: &Vec<Operation>, queue: &mut Vec<String>, funct
|
||||
if position >= arr.length
|
||||
{
|
||||
//return Err(format!("Attempted an out of bounds read for array {} ({} >= {}) at {}:{}", arr.name, position, arr.length, line, col));
|
||||
return Err(String::from("Attempted array out-of-bounds access"));
|
||||
return Err(String::from("Attempted array out-of-bounds access\n"));
|
||||
}
|
||||
if position < 0
|
||||
{
|
||||
//return Err(format!("Attempted an out of bounds read for array {} ({} < 0) at {}:{}", arr.name, position, line, col));
|
||||
return Err(String::from("Attempted array out-of-bounds access"));
|
||||
return Err(String::from("Attempted array out-of-bounds access\n"));
|
||||
}
|
||||
queue.push(arr.data[position as usize].clone());
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
//valid,true
|
||||
//:END:
|
||||
|
||||
import "../std.qbl"
|
||||
|
||||
true boolToStr println
|
||||
|
@ -1,7 +1,8 @@
|
||||
//valid,:END:
|
||||
import "recursive_import_2.qbl"
|
||||
import "recursive_import.qbl"
|
||||
|
||||
function => test
|
||||
{
|
||||
|
||||
"test" println
|
||||
}
|
@ -1 +1,5 @@
|
||||
import "recursive_import.qbl"
|
||||
//valid,test
|
||||
//:END:
|
||||
import "recursive_import.qbl"
|
||||
|
||||
test
|
Reference in New Issue
Block a user