Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adria0 committed May 20, 2024
1 parent e94854e commit a63e589
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion halo2_frontend/src/circuit/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -836,8 +836,8 @@ mod test {
fn test_value_copies() {
let copy = Value::<&mut i64>::known(&mut 1).copied();
let clon = Value::<&mut i64>::known(&mut 1).cloned();
assert_eq!(copy, clon);
assert_eq!(copy, Value::known(1));
assert_eq!(clon, Value::known(1));
}

#[test]
Expand All @@ -854,6 +854,16 @@ mod test {
Value::<[_; 2]>::known([1, 2]).transpose_vec(2),
vec![V::known(1), V::known(2)]
);
assert_eq!(
Value::<[_; 2]>::unknown().transpose_vec(2),
vec![V::unknown(), V::unknown()]
);

// TODO: check if should be this allowed or not
assert_eq!(
Value::<[_; 6]>::unknown().transpose_vec(2),
vec![V::unknown(), V::unknown()]
);
}

#[test]
Expand Down

0 comments on commit a63e589

Please sign in to comment.