This commit is contained in:
parent
0a1f0fa601
commit
e1a79fbffb
File diff suppressed because it is too large
Load Diff
@ -13,6 +13,10 @@ fn two_stacks(x: i128, y: i128, cond: bool) -> Option<i128> {
|
|||||||
if cond { Some(x + y) } else { Some(x - y) }
|
if cond { Some(x + y) } else { Some(x - y) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn aux_char(ch: Vec<char>) -> Option<Vec<char>> {
|
||||||
|
Some(ch)
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn run_extract_test() {
|
fn run_extract_test() {
|
||||||
let mut test_state = EMPTY_STATE;
|
let mut test_state = EMPTY_STATE;
|
||||||
@ -34,4 +38,8 @@ fn run_extract_test() {
|
|||||||
test_state.int = vec![1, 2];
|
test_state.int = vec![1, 2];
|
||||||
test_state.boolean = vec![true];
|
test_state.boolean = vec![true];
|
||||||
run_instruction!(two_stacks, int, test_state, int, int, boolean);
|
run_instruction!(two_stacks, int, test_state, int, int, boolean);
|
||||||
|
|
||||||
|
test_state.vector_char = vec![vec!['a', 'b']];
|
||||||
|
run_instruction!(aux_char, char, test_state, vector_char;);
|
||||||
|
assert_eq!(vec!['a', 'b'], test_state.char);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user