From 1ceb048d2e127cd0930aa3ebc43ffd241326869a Mon Sep 17 00:00:00 2001 From: davidhofman Date: Sun, 22 Aug 2021 12:25:17 +0200 Subject: Implement StandaloneMiscSuite. (#8) * add empty StandaloneTwistSuite * implemented StandaloneTwistSuite * add expectError method to KeyAgreementTest and KeyGeneratorTest * utilize new expectError methods, general cleanup of StandaloneTwistSuite * changed KeyAgreement to ECDH in the description * Add StandaloneCofactorSuite class. * Implement StandaloneCofactorSuite. * Add StandaloneDegenerateSuite. * Add StandaloneInvalidSuite. * Implement StandaloneInvalidSuite. * Implement StandaloneDegenerateSuite. * Small cosmetic change to some constructors. * Add new expectError method to SignatureTest. * Add and implement StandaloneMiscSuite. * More small cosmetic changes. Co-authored-by: davidhofman Co-authored-by: Ján Jančár --- src/cz/crcs/ectester/standalone/test/base/SignatureTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/cz/crcs/ectester/standalone/test/base/SignatureTest.java') diff --git a/src/cz/crcs/ectester/standalone/test/base/SignatureTest.java b/src/cz/crcs/ectester/standalone/test/base/SignatureTest.java index d8b3e0f..a817691 100644 --- a/src/cz/crcs/ectester/standalone/test/base/SignatureTest.java +++ b/src/cz/crcs/ectester/standalone/test/base/SignatureTest.java @@ -22,6 +22,16 @@ public class SignatureTest extends SimpleTest { }); } + public static SignatureTest expectError(SignatureTestable kg, Result.ExpectedValue expected) { + return new SignatureTest(kg, new TestCallback() { + @Override + public Result apply(SignatureTestable signatureTestable) { + Result.Value value = Result.Value.fromExpected(expected, signatureTestable.ok(), false); + return new Result(value, value.description()); + } + }); + } + public static SignatureTest function(SignatureTestable ka, TestCallback callback) { return new SignatureTest(ka, callback); } -- cgit v1.2.3-70-g09d2