From 3ac0ec4ecdea849143ed64e8935e6675b341e44b Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 13 Dec 2013 09:18:05 +0000 Subject: test/ruby: better assertions * test/ruby: use better assertions instead of mere assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_stringchar.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/ruby/test_stringchar.rb') diff --git a/test/ruby/test_stringchar.rb b/test/ruby/test_stringchar.rb index 4cae57f85f..7f7342c9ab 100644 --- a/test/ruby/test_stringchar.rb +++ b/test/ruby/test_stringchar.rb @@ -4,14 +4,14 @@ class TestStringchar < Test::Unit::TestCase def test_string assert_equal("abcd", "abcd") assert_match(/abcd/, "abcd") - assert("abcd" === "abcd") + assert_operator("abcd", :===, "abcd") # compile time string concatenation assert_equal("abcd", "ab" "cd") assert_equal("22aacd44", "#{22}aa" "cd#{44}") assert_equal("22aacd445566", "#{22}aa" "cd#{44}" "55" "#{66}") - assert("abc" !~ /^$/) - assert("abc\n" !~ /^$/) - assert("abc" !~ /^d*$/) + assert_operator("abc", :!~, /^$/) + assert_operator("abc\n", :!~, /^$/) + assert_operator("abc", :!~, /^d*$/) assert_equal(3, ("abc" =~ /d*$/)) assert("" =~ /^$/) assert("\n" =~ /^$/) -- cgit v1.2.3