aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/reader/test/CardWrongCurvesSuite.java
diff options
context:
space:
mode:
authorJ08nY2018-02-10 19:59:41 +0100
committerJ08nY2018-02-10 19:59:41 +0100
commit22e4cfaf40a259be007bddc7b5cd765390de1c11 (patch)
tree7b7429f1215ee9e47efa4b7b2eb688c88b1cc22a /src/cz/crcs/ectester/reader/test/CardWrongCurvesSuite.java
parentab80803c561d05407144ffb5f1c4d45d698fec0b (diff)
downloadECTester-22e4cfaf40a259be007bddc7b5cd765390de1c11.tar.gz
ECTester-22e4cfaf40a259be007bddc7b5cd765390de1c11.tar.zst
ECTester-22e4cfaf40a259be007bddc7b5cd765390de1c11.zip
Handle exceptions in Tests and TestSuites grafeully.
Diffstat (limited to 'src/cz/crcs/ectester/reader/test/CardWrongCurvesSuite.java')
-rw-r--r--src/cz/crcs/ectester/reader/test/CardWrongCurvesSuite.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cz/crcs/ectester/reader/test/CardWrongCurvesSuite.java b/src/cz/crcs/ectester/reader/test/CardWrongCurvesSuite.java
index 1c3ad94..4706bdd 100644
--- a/src/cz/crcs/ectester/reader/test/CardWrongCurvesSuite.java
+++ b/src/cz/crcs/ectester/reader/test/CardWrongCurvesSuite.java
@@ -8,7 +8,6 @@ import cz.crcs.ectester.common.output.TestWriter;
import cz.crcs.ectester.common.test.CompoundTest;
import cz.crcs.ectester.common.test.Result;
import cz.crcs.ectester.common.test.Test;
-import cz.crcs.ectester.common.test.TestException;
import cz.crcs.ectester.common.util.ByteUtil;
import cz.crcs.ectester.common.util.CardUtil;
import cz.crcs.ectester.common.util.ECUtil;
@@ -44,7 +43,7 @@ public class CardWrongCurvesSuite extends CardTestSuite {
List<Test> tests = new LinkedList<>();
Test key = runTest(CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), curve.getField()), Result.ExpectedValue.SUCCESS));
if (!key.ok()) {
- doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "No support for " + curve.getBits() + "b " + CardUtil.getKeyTypeString(curve.getField()), key));
+ doTest(CompoundTest.all(Result.ExpectedValue.SUCCESS, "No support for " + curve.getBits() + "b " + CardUtil.getKeyTypeString(curve.getField()), key));
continue;
}
tests.add(key);
@@ -143,7 +142,7 @@ public class CardWrongCurvesSuite extends CardTestSuite {
*/
}
- private Test ecdhTest(Command setupCmd, String prepareDesc, String fullDesc) throws TestException {
+ private Test ecdhTest(Command setupCmd, String prepareDesc, String fullDesc) {
Test setup = runTest(CommandTest.expect(setupCmd, Result.ExpectedValue.FAILURE));
Test generate = runTest(CommandTest.expect(new Command.Generate(this.card, ECTesterApplet.KEYPAIR_BOTH), Result.ExpectedValue.FAILURE));
Test preparePhase = runTest(CompoundTest.any(Result.ExpectedValue.SUCCESS, prepareDesc, setup, generate));