diff options
| author | J08nY | 2018-07-22 13:15:21 +0200 |
|---|---|---|
| committer | J08nY | 2018-07-22 13:16:27 +0200 |
| commit | c04d4fdc26f7483beb4e56e838f9ba0c2e81560b (patch) | |
| tree | ecebfb18694f15429125208d5fef6187ae390fa9 /src/cz/crcs/ectester/reader/test/CardCompositeSuite.java | |
| parent | 1c678ec14afad688e0f4913dc478394d429ad6ee (diff) | |
| download | ECTester-c04d4fdc26f7483beb4e56e838f9ba0c2e81560b.tar.gz ECTester-c04d4fdc26f7483beb4e56e838f9ba0c2e81560b.tar.zst ECTester-c04d4fdc26f7483beb4e56e838f9ba0c2e81560b.zip | |
Add option for cleanup.
Diffstat (limited to 'src/cz/crcs/ectester/reader/test/CardCompositeSuite.java')
| -rw-r--r-- | src/cz/crcs/ectester/reader/test/CardCompositeSuite.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cz/crcs/ectester/reader/test/CardCompositeSuite.java b/src/cz/crcs/ectester/reader/test/CardCompositeSuite.java index 5de8608..ec56901 100644 --- a/src/cz/crcs/ectester/reader/test/CardCompositeSuite.java +++ b/src/cz/crcs/ectester/reader/test/CardCompositeSuite.java @@ -55,7 +55,6 @@ public class CardCompositeSuite extends CardTestSuite { tests.add(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, "Composite test of " + curve.getId() + ", " + key.getDesc(), ecdh)); } doTest(CompoundTest.all(ExpectedValue.SUCCESS, "Composite test of " + curve.getId() + ".", tests.toArray(new Test[0]))); - new Command.Cleanup(this.card).send(); } @@ -105,9 +104,12 @@ public class CardCompositeSuite extends CardTestSuite { } else { description = testName + " test of " + curve.getId() + "."; } - Test cleanup = CommandTest.expect(new Command.Cleanup(this.card), ExpectedValue.SUCCESS); - - doTest(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, description, allocate, set, generate, ecdh, cleanup)); + if (cfg.cleanup) { + Test cleanup = CommandTest.expect(new Command.Cleanup(this.card), ExpectedValue.SUCCESS); + doTest(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, description, allocate, set, generate, ecdh, cleanup)); + } else { + doTest(CompoundTest.greedyAllTry(ExpectedValue.SUCCESS, description, allocate, set, generate, ecdh)); + } } } |
