Skip to content

Commit

Permalink
Add cost-model test for generic range check
Browse files Browse the repository at this point in the history
  • Loading branch information
ntc2 committed Mar 16, 2024
1 parent a74a2f4 commit f96ee5b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions halo2_gadgets/goldenfiles/cost-model/generic_range_check.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
max_deg,advice_columns,lookups,permutations,column_queries,point_sets,proof_size
6,2,1,3,19,4,2400
10 changes: 10 additions & 0 deletions halo2_gadgets/src/utilities/generic_range_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,5 +423,15 @@ mod test {
}
}
}

#[test]
fn cost_model() {
use crate::utilities::cost_model::circuit_to_csv;
let b = -pallas::Base::from(1);
let x = pallas::Base::from(0);
let mode = Mode { x, b };
let circuit = MyCircuit::<pallas::Base> { mode };
circuit_to_csv(11, "generic_range_check", &[], circuit);
}
}
}

0 comments on commit f96ee5b

Please sign in to comment.