Ensure evaluation test success is non-trivial

This commit is contained in:
Ramana Kumar 2022-10-07 00:52:31 +01:00
parent 61a43c95a2
commit 0b5db6413e
No known key found for this signature in database
GPG Key ID: ED471C788B900433
1 changed files with 7 additions and 0 deletions

View File

@ -83,6 +83,13 @@ class tests {
System.Diagnostics.Trace.Assert(result == 0, "Evaluation failed");
System.Diagnostics.Trace.Assert(y == HexadecimalStringToByteArray("1c000000000000000d0000000000000000000000000000000000000000000000"),
"Evaluation produced incorrect value");
x[11] = 0x11;
result = ckzg.evaluate_polynomial_in_evaluation_form(y, p, x, ts);
System.Diagnostics.Trace.Assert(result == 0, "Second evaluation failed");
System.Diagnostics.Trace.Assert(y != HexadecimalStringToByteArray("1c000000000000000d0000000000000000000000000000000000000000000000"),
"Second evaluation produced incorrect value");
ckzg.free_trusted_setup(ts);
Console.WriteLine("Tests passed");