diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-21 05:51:41 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-21 05:51:41 +0000 |
| commit | ffb471c8af755c7a44bce8bf34c9e04b4cd9e2c7 (patch) | |
| tree | b12c0550733bcac2a76b583ff5fd88f60340ea92 /lib/prettyprint.rb | |
| parent | 0e633168e14a1f6cd7e49d91947a70fad88f7a5a (diff) | |
| download | ruby-ffb471c8af755c7a44bce8bf34c9e04b4cd9e2c7.tar.gz ruby-ffb471c8af755c7a44bce8bf34c9e04b4cd9e2c7.tar.xz ruby-ffb471c8af755c7a44bce8bf34c9e04b4cd9e2c7.zip | |
* lib/pp.rb: Use Test::Unit.
* lib/prettyprint.rb: Ditto
* lib/time.rb: Ditto
* lib/tsort.rb: Ditto
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/prettyprint.rb')
| -rw-r--r-- | lib/prettyprint.rb | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/prettyprint.rb b/lib/prettyprint.rb index 7f1497b54..f7b9bbdf5 100644 --- a/lib/prettyprint.rb +++ b/lib/prettyprint.rb @@ -392,10 +392,9 @@ class PrettyPrint end if __FILE__ == $0 - require 'runit/testcase' - require 'runit/cui/testrunner' + require 'test/unit' - class WadlerExample < RUNIT::TestCase + class WadlerExample < Test::Unit::TestCase def setup @tree = Tree.new("aaaa", Tree.new("bbbbb", Tree.new("ccc"), Tree.new("dd")), @@ -632,7 +631,7 @@ End end end - class StrictPrettyExample < RUNIT::TestCase + class StrictPrettyExample < Test::Unit::TestCase def prog(width) PrettyPrint.format('', width) {|pp| pp.group { @@ -777,7 +776,7 @@ End end - class TailGroup < RUNIT::TestCase + class TailGroup < Test::Unit::TestCase def test_1 out = PrettyPrint.format('', 10) {|pp| pp.group { @@ -797,7 +796,7 @@ End end end - class NonString < RUNIT::TestCase + class NonString < Test::Unit::TestCase def format(width) PrettyPrint.format([], width, 'newline', lambda {|n| "#{n} spaces"}) {|pp| pp.text(3, 3) @@ -816,7 +815,7 @@ End end - class Fill < RUNIT::TestCase + class Fill < Test::Unit::TestCase def format(width) PrettyPrint.format('', width) {|pp| pp.group { @@ -907,10 +906,4 @@ End end end - - RUNIT::CUI::TestRunner.run(WadlerExample.suite) - RUNIT::CUI::TestRunner.run(StrictPrettyExample.suite) - RUNIT::CUI::TestRunner.run(TailGroup.suite) - RUNIT::CUI::TestRunner.run(NonString.suite) - RUNIT::CUI::TestRunner.run(Fill.suite) end |
