Skip to content

Commit a268d24

Browse files
author
gefeili
committed
Add AllTests for split folder.
1 parent ab95c5e commit a268d24

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package org.bouncycastle.crypto.split.test;
2+
3+
import junit.extensions.TestSetup;
4+
import junit.framework.Test;
5+
import junit.framework.TestCase;
6+
import junit.framework.TestSuite;
7+
8+
import org.bouncycastle.test.PrintTestResult;
9+
10+
public class AllTests
11+
extends TestCase
12+
{
13+
public static void main(String[] args)
14+
{
15+
PrintTestResult.printResult(junit.textui.TestRunner.run(suite()));
16+
}
17+
18+
public static Test suite()
19+
{
20+
TestSuite suite = new TestSuite("Secret Sharing Tests");
21+
suite.addTestSuite(PolynomialTest.class);
22+
return new AllTests.BCTestSetup(suite);
23+
}
24+
25+
static class BCTestSetup
26+
extends TestSetup
27+
{
28+
public BCTestSetup(Test test)
29+
{
30+
super(test);
31+
}
32+
33+
protected void setUp()
34+
{
35+
36+
}
37+
38+
protected void tearDown()
39+
{
40+
41+
}
42+
}
43+
}

core/src/test/java/org/bouncycastle/crypto/split/test/PolynomialTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,18 @@ private interface PolynomialFactory
785785
Polynomial newInstance(int l, int m, int n);
786786
}
787787

788+
@Override
789+
public String getName()
790+
{
791+
return "Polynomial Test";
792+
}
793+
788794
public void performTest()
795+
{
796+
testPolynomial();;
797+
}
798+
799+
public void testPolynomial()
789800
{
790801
testPolynoimial1(new PolynomialFactory()
791802
{

0 commit comments

Comments
 (0)