01: package org.bouncycastle.crypto.test;
02:
03: import junit.framework.Test;
04: import junit.framework.TestCase;
05: import junit.framework.TestSuite;
06:
07: import org.bouncycastle.util.test.SimpleTestResult;
08:
09: public class AllTests extends TestCase {
10: public void testCrypto() {
11: org.bouncycastle.util.test.Test[] tests = RegressionTest.tests;
12:
13: for (int i = 0; i != tests.length; i++) {
14: SimpleTestResult result = (SimpleTestResult) tests[i]
15: .perform();
16:
17: if (!result.isSuccessful()) {
18: fail(result.toString());
19: }
20: }
21: }
22:
23: public static void main(String[] args) {
24: junit.textui.TestRunner.run(suite());
25: }
26:
27: public static Test suite() {
28: TestSuite suite = new TestSuite("Lightweight Crypto Tests");
29:
30: suite.addTestSuite(AllTests.class);
31:
32: return suite;
33: }
34: }
|