mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* 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
This commit is contained in:
		
							parent
							
								
									c2dbfe53fc
								
							
						
					
					
						commit
						fce7467e60
					
				
					 5 changed files with 113 additions and 89 deletions
				
			
		|  | @ -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 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 akr
						akr