diff options
| author | davidhofman | 2021-08-22 12:25:17 +0200 |
|---|---|---|
| committer | GitHub | 2021-08-22 12:25:17 +0200 |
| commit | 1ceb048d2e127cd0930aa3ebc43ffd241326869a (patch) | |
| tree | 7a66cfc2c9a764f276d97584d1fd1b0efa1b863a /src/cz/crcs/ectester/standalone/test/base/SignatureTest.java | |
| parent | 63161d5916c772667ed6482b7d7e16973ed2ea74 (diff) | |
| download | ECTester-1ceb048d2e127cd0930aa3ebc43ffd241326869a.tar.gz ECTester-1ceb048d2e127cd0930aa3ebc43ffd241326869a.tar.zst ECTester-1ceb048d2e127cd0930aa3ebc43ffd241326869a.zip | |
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 <davidhofman@github.com>
Co-authored-by: Ján Jančár <J08nY@users.noreply.github.com>
Diffstat (limited to 'src/cz/crcs/ectester/standalone/test/base/SignatureTest.java')
| -rw-r--r-- | src/cz/crcs/ectester/standalone/test/base/SignatureTest.java | 10 |
1 files changed, 10 insertions, 0 deletions
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<SignatureTestable> { }); } + public static SignatureTest expectError(SignatureTestable kg, Result.ExpectedValue expected) { + return new SignatureTest(kg, new TestCallback<SignatureTestable>() { + @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<SignatureTestable> callback) { return new SignatureTest(ka, callback); } |
