File: bit_length_test.rb

package info (click to toggle)
ruby-backports 3.25.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,912 kB
  • sloc: ruby: 11,757; makefile: 6
file content (11 lines) | stat: -rw-r--r-- 404 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
require './test/test_helper'

class BitLengthTest < Test::Unit::TestCase
  def test_big_num # Issue #95
    require 'backports/2.1.0/bignum/bit_length'
    r = 91178362617816881166579720176198217549251305244541026425489888079462471837807
    assert_equal 256, r.bit_length
    r = 57896044618658097711785492504343953926634992332820282019728792003956564819968
    assert_equal 256, r.bit_length
  end
end