summaryrefslogtreecommitdiff
path: root/test/openssl
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-03 18:28:56 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-03 18:28:56 +0000
commit7b58445ebd3218011c1cebdc0e6693cb008bb006 (patch)
treeb56582551c4b90d34ffc517f085ec11c46b48d87 /test/openssl
parent7181490def5ad5670e2503e91c526eab1039b008 (diff)
* ext/openssl/ossl_bn.c (ossl_bn_initialize): fix can't create from bn.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl')
-rw-r--r--test/openssl/test_bn.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/openssl/test_bn.rb b/test/openssl/test_bn.rb
index 7136de9a27..af1c72c8e9 100644
--- a/test/openssl/test_bn.rb
+++ b/test/openssl/test_bn.rb
@@ -3,6 +3,10 @@ require_relative 'utils'
if defined?(OpenSSL)
class OpenSSL::TestBN < Test::Unit::TestCase
+ def test_bn_to_bn
+ assert_equal(999.to_bn, OpenSSL::BN.new(999.to_bn))
+ end
+
def test_integer_to_bn
assert_equal(999.to_bn, OpenSSL::BN.new(999.to_s(16), 16))
assert_equal((2 ** 107 - 1).to_bn, OpenSSL::BN.new((2 ** 107 - 1).to_s(16), 16))