Sha256: 888300bcffd17714d80e6c4c427fce46e025bc7afa2665235408df51afc808ad

Contents?: true

Size: 444 Bytes

Versions: 15

Compression:

Stored size: 444 Bytes

Contents

# -*- coding: utf-8 -*-


require_relative 'helper'


class TestStruct < Test::Unit::TestCase

  def setup ()
    @x = Rucy::Tester::Struct.new
  end

  def test_default_value_is_0 ()
    assert_equal 0, @x.num
  end

  def test_get_set_num ()
    @x.num = 1
    assert_equal 1, @x.num
  end

  def test_dup ()
    assert_equal 0, @x.num
    x = @x.dup
    @x.num = 1
    assert_equal 1, @x.num
    assert_equal 0, x.num
  end

end# TestStruct

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rucy-0.1.21 test/test_struct.rb
rucy-0.1.20 test/test_struct.rb
rucy-0.1.18 test/test_struct.rb
rucy-0.1.16 test/test_struct.rb
rucy-0.1.15 test/test_struct.rb
rucy-0.1.14 test/test_struct.rb
rucy-0.1.13 test/test_struct.rb
rucy-0.1.12 test/test_struct.rb
rucy-0.1.11 test/test_struct.rb
rucy-0.1.10 test/test_struct.rb
rucy-0.1.9 test/test_struct.rb
rucy-0.1.8 test/test_struct.rb
rucy-0.1.7 test/test_struct.rb
rucy-0.1.6 test/test_struct.rb
rucy-0.1.5 test/test_struct.rb