dev::bad_lookup test: Do not assign zero in lookup table.

We now expect the lookup to fail when q = 0, but it still passes,
revealing a bug in the MockProver.
This commit is contained in:
therealyingtong 2022-01-04 14:04:26 +08:00
parent 408b617376
commit 3d22943ebe
1 changed files with 4 additions and 3 deletions

View File

@ -1095,7 +1095,8 @@ mod tests {
let q = cells.query_selector(q);
// If q is enabled, a must be in the table.
// Zero is in the table, which satisfies the disabled case.
// FIXME: This lookup expression should fail when q = 0,
// since 0 is not in the table.
vec![(q * a, table)]
});
@ -1114,12 +1115,12 @@ mod tests {
layouter.assign_table(
|| "Doubling table",
|mut table| {
(0..(1 << (K - 1)))
(1..(1 << (K - 1)))
.map(|i| {
table.assign_cell(
|| format!("table[{}] = {}", i, 2 * i),
config.table,
i,
i - 1,
|| Ok(Fp::from(2 * i as u64)),
)
})