summary refs log tree commit diff
path: root/crypto/test/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/test/src/util')
-rw-r--r--crypto/test/src/util/io/pem/test/AllTests.cs6
-rw-r--r--crypto/test/src/util/test/FixedSecureRandom.cs7
-rw-r--r--crypto/test/src/util/test/SimpleTest.cs8
3 files changed, 16 insertions, 5 deletions
diff --git a/crypto/test/src/util/io/pem/test/AllTests.cs b/crypto/test/src/util/io/pem/test/AllTests.cs

index 5f0c12c10..921c40cb8 100644 --- a/crypto/test/src/util/io/pem/test/AllTests.cs +++ b/crypto/test/src/util/io/pem/test/AllTests.cs
@@ -1,11 +1,12 @@ -#if !LIB using System; using System.Collections; using System.Collections.Specialized; using System.IO; using System.Text; +#if !LIB using NUnit.Core; +#endif using NUnit.Framework; using Org.BouncyCastle.Crypto; @@ -20,6 +21,7 @@ namespace Org.BouncyCastle.Utilities.IO.Pem.Tests [TestFixture] public class AllTests { +#if !LIB public static void Main(string[] args) { Suite.Run(new NullListener(), NUnit.Core.TestFilter.Empty); @@ -35,6 +37,7 @@ namespace Org.BouncyCastle.Utilities.IO.Pem.Tests return suite; } } +#endif [Test] public void TestPemLength() @@ -73,4 +76,3 @@ namespace Org.BouncyCastle.Utilities.IO.Pem.Tests } } } -#endif diff --git a/crypto/test/src/util/test/FixedSecureRandom.cs b/crypto/test/src/util/test/FixedSecureRandom.cs
index 15a2e9bb3..d8598ac24 100644 --- a/crypto/test/src/util/test/FixedSecureRandom.cs +++ b/crypto/test/src/util/test/FixedSecureRandom.cs
@@ -38,7 +38,12 @@ namespace Org.BouncyCastle.Utilities.Test return new FixedSecureRandom(bOut.ToArray()); } - public override void NextBytes( + public override byte[] GenerateSeed(int numBytes) + { + return SecureRandom.GetNextBytes(this, numBytes); + } + + public override void NextBytes( byte[] buf) { Array.Copy(_data, _index, buf, 0, buf.Length); diff --git a/crypto/test/src/util/test/SimpleTest.cs b/crypto/test/src/util/test/SimpleTest.cs
index faeee65c9..bf6c8fb92 100644 --- a/crypto/test/src/util/test/SimpleTest.cs +++ b/crypto/test/src/util/test/SimpleTest.cs
@@ -115,7 +115,9 @@ namespace Org.BouncyCastle.Utilities.Test private static string GetFullName( string name) { -#if PORTABLE +#if SEPARATE_UNIT_TESTS + return "UnitTests.data." + name; +#elif PORTABLE return "crypto.tests." + name; #else return "crypto.test.data." + name; @@ -125,7 +127,9 @@ namespace Org.BouncyCastle.Utilities.Test private static string GetShortName( string fullName) { -#if PORTABLE +#if SEPARATE_UNIT_TESTS + return fullName.Substring("UnitTests.data.".Length); +#elif PORTABLE return fullName.Substring("crypto.tests.".Length); #else return fullName.Substring("crypto.test.data.".Length);