diff options
Diffstat (limited to 'jni/ruby/test/-ext-/string/test_qsort.rb')
-rw-r--r-- | jni/ruby/test/-ext-/string/test_qsort.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/jni/ruby/test/-ext-/string/test_qsort.rb b/jni/ruby/test/-ext-/string/test_qsort.rb new file mode 100644 index 0000000..3a58523 --- /dev/null +++ b/jni/ruby/test/-ext-/string/test_qsort.rb @@ -0,0 +1,19 @@ +require 'test/unit' +require "-test-/string/string" + +class Test_StringQSort < Test::Unit::TestCase + def test_qsort + s = Bug::String.new("xxozfxx") + s.qsort! + assert_equal("foxxxxz", s) + end + + def test_qsort_slice + s = Bug::String.new("xxofzx1") + s.qsort!(nil, nil, 3) + assert_equal("fzxxxo1", s) + s = Bug::String.new("xxofzx231") + s.qsort!(nil, nil, 3) + assert_equal("231fzxxxo", s) + end +end |