Sha256: 4d686f4710a4446715facdd02a4f99e5107868fddaf86e81f78d2a3ff63ce0c9

Contents?: true

Size: 743 Bytes

Versions: 1

Compression:

Stored size: 743 Bytes

Contents

# -*- coding: utf-8 -*-
require "sixarm_ruby_ramp_test"
require "sixarm_ruby_ramp/integer/rbit"

class IntegerTest < Minitest::Test

  def test_width_8_zero
    assert_equal(0,0.rbit(8))
  end

  def test_width_8_one
    assert_equal(128,1.rbit(8))
  end

  def text_width_8_max
    assert_equal(255,255.rbit(8))
  end

  def test_width_16_zero
    assert_equal(0, 0.rbit(16))
  end

  def test_width_16_one
    assert_equal(32768, 1.rbit(16))
  end

  def test_width_16_max
    assert_equal(65535, 65535.rbit(16))
  end

  def test_width_32_zero
    assert_equal(0, 0.rbit(32))
  end

  def test_width_32_one
    assert_equal(2147483648, 1.rbit(32))
  end

  def test_width_32_max
    assert_equal(4294967295, 4294967295.rbit(32))
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sixarm_ruby_ramp-4.2.4 test/sixarm_ruby_ramp_test/integer/rbit_test.rb