aboutsummaryrefslogtreecommitdiffstats
path: root/lib/prettyprint.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-21 05:51:41 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-21 05:51:41 +0000
commitfce7467e601e76d64a175929f2f14f89cfd450dd (patch)
treeb12c0550733bcac2a76b583ff5fd88f60340ea92 /lib/prettyprint.rb
parentc2dbfe53fc1d34b3c38172bda2a801fc60f26e66 (diff)
downloadruby-fce7467e601e76d64a175929f2f14f89cfd450dd.tar.gz
* lib/pp.rb: Use Test::Unit.
* lib/prettyprint.rb: Ditto * lib/time.rb: Ditto * lib/tsort.rb: Ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/prettyprint.rb')
-rw-r--r--lib/prettyprint.rb19
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/prettyprint.rb b/lib/prettyprint.rb
index 7f1497b541..f7b9bbdf5f 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