diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-09-20 18:25:17 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-09-20 18:25:17 +0700 |
commit | 427206058f1c7e3e53daa31ab510f32c5a64845a (patch) | |
tree | a908048615c058f1cf08b0b063fbe7fb3d55e558 /crypto/test/src/util | |
parent | Cleanup (diff) | |
download | BouncyCastle.NET-ed25519-427206058f1c7e3e53daa31ab510f32c5a64845a.tar.xz |
Port of Asn1.Cmp tests from bc-java
Diffstat (limited to 'crypto/test/src/util')
-rw-r--r-- | crypto/test/src/util/test/SimpleTest.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/test/src/util/test/SimpleTest.cs b/crypto/test/src/util/test/SimpleTest.cs index 81c38b54f..0a2b5e991 100644 --- a/crypto/test/src/util/test/SimpleTest.cs +++ b/crypto/test/src/util/test/SimpleTest.cs @@ -194,5 +194,12 @@ namespace Org.BouncyCastle.Utilities.Test { return new DateTime(year, month, day, hour, minute, second, millisecond, DateTimeKind.Utc); } + + public static void TestBitStringConstant(int bitNo, int value) + { + int expectedValue = 1 << ((bitNo | 7) - (bitNo & 7)); + if (expectedValue != value) + throw new ArgumentException("bit value " + bitNo + " wrong"); + } } } |