summary refs log tree commit diff
path: root/crypto/test
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-27 17:31:03 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-27 17:31:03 +0700
commit71a0d08db67c5deb10feb185eb5a29e882ea971d (patch)
tree8045881eb22a1221a801a3156afce3e147c2ecf5 /crypto/test
parentGenerics migration in Pkix (diff)
downloadBouncyCastle.NET-ed25519-71a0d08db67c5deb10feb185eb5a29e882ea971d.tar.xz
Split up fast/slow tests
Diffstat (limited to 'crypto/test')
-rw-r--r--crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs32
1 files changed, 26 insertions, 6 deletions
diff --git a/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs b/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs
index 19eac4b5d..e398b3017 100644
--- a/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs
+++ b/crypto/test/src/pqc/crypto/test/SphincsPlusTest.cs
@@ -24,7 +24,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests
     [TestFixture]
     public class SphincsPlusTest
     {
-        private static readonly string[] TestVectorFilesRobust =
+        private static readonly string[] TestVectorFilesRobustFast =
         {
             "sha2-128f-robust.rsp",
             "sha2-192f-robust.rsp",
@@ -32,6 +32,9 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests
             "shake-128f-robust.rsp",
             "shake-192f-robust.rsp",
             "shake-256f-robust.rsp",
+        };
+        private static readonly string[] TestVectorFilesRobustSlow =
+        {
             "sha2-128s-robust.rsp",
             "sha2-192s-robust.rsp",
             "sha2-256s-robust.rsp",
@@ -39,7 +42,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests
             "shake-192s-robust.rsp",
             "shake-256s-robust.rsp",
         };
-        private static readonly string[] TestVectorFilesSimple =
+        private static readonly string[] TestVectorFilesSimpleFast =
         {
             "sha2-128f-simple.rsp",
             "sha2-192f-simple.rsp",
@@ -47,6 +50,9 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests
             "shake-128f-simple.rsp",
             "shake-192f-simple.rsp",
             "shake-256f-simple.rsp",
+        };
+        private static readonly string[] TestVectorFilesSimpleSlow =
+        {
             "sha2-128s-simple.rsp",
             "sha2-192s-simple.rsp",
             "sha2-256s-simple.rsp",
@@ -55,16 +61,30 @@ namespace Org.BouncyCastle.Pqc.Crypto.Tests
             "shake-256s-simple.rsp",
         };
 
-        [Explicit, TestCaseSource(nameof(TestVectorFilesRobust))]
+        [TestCaseSource(nameof(TestVectorFilesRobustFast))]
+        [Parallelizable(ParallelScope.All)]
+        public void TVRobustFast(string testVectorFile)
+        {
+            RunTestVectorFile(testVectorFile);
+        }
+
+        [Explicit, TestCaseSource(nameof(TestVectorFilesRobustSlow))]
+        [Parallelizable(ParallelScope.All)]
+        public void TVRobustSlow(string testVectorFile)
+        {
+            RunTestVectorFile(testVectorFile);
+        }
+
+        [TestCaseSource(nameof(TestVectorFilesSimpleFast))]
         [Parallelizable(ParallelScope.All)]
-        public void TestVectorsRobust(string testVectorFile)
+        public void TVSimpleFast(string testVectorFile)
         {
             RunTestVectorFile(testVectorFile);
         }
 
-        [TestCaseSource(nameof(TestVectorFilesSimple))]
+        [Explicit, TestCaseSource(nameof(TestVectorFilesSimpleSlow))]
         [Parallelizable(ParallelScope.All)]
-        public void TestVectorsSimple(string testVectorFile)
+        public void TVSimpleSlow(string testVectorFile)
         {
             RunTestVectorFile(testVectorFile);
         }