ruby-changes:64908
From: Sutou <ko1@a...>
Date: Sun, 17 Jan 2021 06:09:00 +0900 (JST)
Subject: [ruby-changes:64908] a4a6cb036e (master): Remove samples for test-unit
https://git.ruby-lang.org/ruby.git/commit/?id=a4a6cb036e From a4a6cb036e4b374a9616cf38f4d8d74ac4478d8d Mon Sep 17 00:00:00 2001 From: Sutou Kouhei <kou@c...> Date: Sun, 17 Jan 2021 06:08:21 +0900 Subject: Remove samples for test-unit They are no longer needed. diff --git a/sample/testunit/adder.rb b/sample/testunit/adder.rb deleted file mode 100644 index aa5c88c..0000000 --- a/sample/testunit/adder.rb +++ /dev/null @@ -1,13 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/#L0 -# 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 - diff --git a/sample/testunit/subtracter.rb b/sample/testunit/subtracter.rb deleted file mode 100644 index 2c08247..0000000 --- a/sample/testunit/subtracter.rb +++ /dev/null @@ -1,12 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/#L0 -# 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 diff --git a/sample/testunit/tc_adder.rb b/sample/testunit/tc_adder.rb deleted file mode 100644 index 8453beb..0000000 --- a/sample/testunit/tc_adder.rb +++ /dev/null @@ -1,18 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/#L0 -# 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 diff --git a/sample/testunit/tc_subtracter.rb b/sample/testunit/tc_subtracter.rb deleted file mode 100644 index d2c8313..0000000 --- a/sample/testunit/tc_subtracter.rb +++ /dev/null @@ -1,18 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/#L0 -# 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 diff --git a/sample/testunit/ts_examples.rb b/sample/testunit/ts_examples.rb deleted file mode 100644 index 3d24dd6..0000000 --- a/sample/testunit/ts_examples.rb +++ /dev/null @@ -1,7 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/#L0 -# 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' -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/