Skip to content

Commit 7d94f15

Browse files
committed
test: add failing test for linear relation
1 parent f113185 commit 7d94f15

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/tests/test_validation_criteria.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,20 @@ mod instance_validation {
131131
let result = CanonicalLinearRelation::try_from(&relation);
132132
assert!(result.is_err());
133133
}
134+
135+
#[test]
136+
fn without_witness() {
137+
let B = G::generator();
138+
let x = Scalar::from(42);
139+
140+
let mut linear_relation = LinearRelation::<G>::new();
141+
let B_var = linear_relation.allocate_element();
142+
let _X_var = linear_relation.allocate_eq(B_var * x + B_var * Scalar::from(3));
143+
144+
linear_relation.set_element(B_var, B);
145+
let result = CanonicalLinearRelation::try_from(&linear_relation);
146+
assert!(result.is_err());
147+
}
134148
}
135149

136150
#[cfg(test)]

0 commit comments

Comments
 (0)