diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-07 01:47:22 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-07 01:47:22 +0000 |
commit | 77280b6cd66467c7ff7f04c4849dd4a5181d5397 (patch) | |
tree | f1413dec1efeabbefb76607f3e0cec1dd4bc5c94 | |
parent | bc7abeb37b1306c8f0aa92fdd2c882a73771cdb5 (diff) | |
download | ruby-77280b6cd66467c7ff7f04c4849dd4a5181d5397.tar.gz |
test_struct.rb: use assert_same
* test/ruby/test_struct.rb (test_question_mark_in_member): true value
has no meanings itself. use assert_same instead.
* test/ruby/test_struct.rb (test_bang_mark_in_member): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_struct.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/ruby/test_struct.rb b/test/ruby/test_struct.rb index b213778b61..6589f0a24b 100644 --- a/test/ruby/test_struct.rb +++ b/test/ruby/test_struct.rb @@ -286,14 +286,16 @@ module TestStruct def test_question_mark_in_member klass = @Struct.new(:a, :b?) - o = klass.new("test", true) - assert_predicate(o, :b?) + x = Object.new + o = klass.new("test", x) + assert_same(x, o.b?) end def test_bang_mark_in_member klass = @Struct.new(:a, :b!) - o = klass.new("test", true) - assert_predicate(o, :b!) + x = Object.new + o = klass.new("test", x) + assert_same(x, o.b!) end class TopStruct < Test::Unit::TestCase |