summary refs log tree commit diff
path: root/crypto/test/src/asn1
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-11-13 13:34:13 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-11-13 13:34:13 +0700
commit3d4f3a33994cfd31204b392978e964cdde2fb48a (patch)
tree21ca73763d3dbefcb0e61100e5b70b31601feba2 /crypto/test/src/asn1
parentFurther refinement to random prime constructor (diff)
downloadBouncyCastle.NET-ed25519-3d4f3a33994cfd31204b392978e964cdde2fb48a.tar.xz
Include basic encode/parse test
Diffstat (limited to 'crypto/test/src/asn1')
-rw-r--r--crypto/test/src/asn1/test/BitStringTest.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/test/src/asn1/test/BitStringTest.cs b/crypto/test/src/asn1/test/BitStringTest.cs
index 05be45941..f2ae3de97 100644
--- a/crypto/test/src/asn1/test/BitStringTest.cs
+++ b/crypto/test/src/asn1/test/BitStringTest.cs
@@ -19,8 +19,12 @@ namespace Org.BouncyCastle.Asn1.Tests
             // basic construction
             DerBitString s1 = new DerBitString(new byte[0], 0);
 
+            // check GetBytes()
             s1.GetBytes();
 
+            // check encoding/decoding
+            DerBitString derBit = (DerBitString)Asn1Object.FromByteArray(s1.GetEncoded());
+
             if (!Arrays.AreEqual(s1.GetEncoded(), Hex.Decode("030100")))
             {
                 Fail("zero encoding wrong");