[cairo-commit] rcairo/test-unit/sample adder.rb, NONE, 1.1 subtracter.rb, NONE, 1.1 tc_adder.rb, NONE, 1.1 tc_subtracter.rb, NONE, 1.1 ts_examples.rb, NONE, 1.1
Kouhei Sutou
commit at pdx.freedesktop.org
Wed Aug 13 01:20:59 PDT 2008
- Previous message: [cairo-commit] rcairo/test-unit/lib/test/unit/util backtracefilter.rb, NONE, 1.1 observable.rb, NONE, 1.1 procwrapper.rb, NONE, 1.1
- Next message: [cairo-commit] rcairo/test-unit/test run-test.rb, NONE, 1.1 test_assertions.rb, NONE, 1.1 test_attribute.rb, NONE, 1.1 test_color.rb, NONE, 1.1 test_diff.rb, NONE, 1.1 test_emacs_runner.rb, NONE, 1.1 test_error.rb, NONE, 1.1 test_failure.rb, NONE, 1.1 test_fixture.rb, NONE, 1.1 test_notification.rb, NONE, 1.1 test_omission.rb, NONE, 1.1 test_pending.rb, NONE, 1.1 test_priority.rb, NONE, 1.1 test_testcase.rb, NONE, 1.1 test_testresult.rb, NONE, 1.1 test_testsuite.rb, NONE, 1.1 testunit_test_util.rb, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: kou
Update of /cvs/cairo/rcairo/test-unit/sample
In directory kemper:/tmp/cvs-serv10309/test-unit/sample
Added Files:
adder.rb subtracter.rb tc_adder.rb tc_subtracter.rb
ts_examples.rb
Log Message:
* test-unit: imported Test::Unit 2.x.
--- NEW FILE: adder.rb ---
# Author:: Nathaniel Talbott.
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
# License:: Ruby license.
class Adder
def initialize(number)
@number = number
end
def add(number)
return @number + number
end
end
--- NEW FILE: subtracter.rb ---
# Author:: Nathaniel Talbott.
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
# License:: Ruby license.
class Subtracter
def initialize(number)
@number = number
end
def subtract(number)
return @number - number
end
end
--- NEW FILE: tc_adder.rb ---
# Author:: Nathaniel Talbott.
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
# License:: Ruby license.
require 'test/unit'
require 'adder'
class TC_Adder < Test::Unit::TestCase
def setup
@adder = Adder.new(5)
end
def test_add
assert_equal(7, @adder.add(2), "Should have added correctly")
end
def teardown
@adder = nil
end
end
--- NEW FILE: tc_subtracter.rb ---
# Author:: Nathaniel Talbott.
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
# License:: Ruby license.
require 'test/unit'
require 'subtracter'
class TC_Subtracter < Test::Unit::TestCase
def setup
@subtracter = Subtracter.new(5)
end
def test_subtract
assert_equal(3, @subtracter.subtract(2), "Should have subtracted correctly")
end
def teardown
@subtracter = nil
end
end
--- NEW FILE: ts_examples.rb ---
# Author:: Nathaniel Talbott.
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
# License:: Ruby license.
require 'test/unit'
require 'tc_adder'
require 'tc_subtracter'
- Previous message: [cairo-commit] rcairo/test-unit/lib/test/unit/util backtracefilter.rb, NONE, 1.1 observable.rb, NONE, 1.1 procwrapper.rb, NONE, 1.1
- Next message: [cairo-commit] rcairo/test-unit/test run-test.rb, NONE, 1.1 test_assertions.rb, NONE, 1.1 test_attribute.rb, NONE, 1.1 test_color.rb, NONE, 1.1 test_diff.rb, NONE, 1.1 test_emacs_runner.rb, NONE, 1.1 test_error.rb, NONE, 1.1 test_failure.rb, NONE, 1.1 test_fixture.rb, NONE, 1.1 test_notification.rb, NONE, 1.1 test_omission.rb, NONE, 1.1 test_pending.rb, NONE, 1.1 test_priority.rb, NONE, 1.1 test_testcase.rb, NONE, 1.1 test_testresult.rb, NONE, 1.1 test_testsuite.rb, NONE, 1.1 testunit_test_util.rb, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list