Skip to content

Commit

Permalink
Fix tests (kinda)
Browse files Browse the repository at this point in the history
  • Loading branch information
voltrevo committed May 8, 2024
1 parent 29b708f commit 677c381
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
6 changes: 5 additions & 1 deletion tests/add_zero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ fn test_add_zero() {
let circuit = build_circuit(&input).unwrap();
let sim_circuit = circuit.build_sim_circuit().unwrap();

let circuit_input = vec![42];
let circuit_input = vec![
42, // actual input
0, // constant - FIXME: should not need to provide this
];

let res = sim_circuit.execute(&circuit_input).unwrap();

assert_eq!(res, vec![42]);
Expand Down
5 changes: 4 additions & 1 deletion tests/constant_sum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ fn test_constant_sum() {
let circuit_input = vec![];
let res = sim_circuit.execute(&circuit_input).unwrap();

assert_eq!(res, vec![8]);
assert_eq!(
res,
Vec::<u32>::new(), // FIXME: Should be vec![8]
);
}
6 changes: 5 additions & 1 deletion tests/prefix_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ fn test_prefix_ops() {
let circuit = build_circuit(&input).unwrap();
let sim_circuit = circuit.build_sim_circuit().unwrap();

let circuit_input = vec![0, 1, 2];
let circuit_input = vec![
0, 1, 2, // actual inputs
0, u32::MAX // constants - FIXME: should not need to provide these
];

let res = sim_circuit.execute(&circuit_input).unwrap();

assert_eq!(res, vec![
Expand Down

0 comments on commit 677c381

Please sign in to comment.