diff options
author | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-16 18:49:26 +0900 |
---|---|---|
committer | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-30 00:39:06 +0900 |
commit | fcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch) | |
tree | 64cb17de3f41a2b6fef2368028fbd00349946994 /jni/ruby/test/testunit/tests_for_parallel |
Fresh start
Diffstat (limited to 'jni/ruby/test/testunit/tests_for_parallel')
5 files changed, 70 insertions, 0 deletions
diff --git a/jni/ruby/test/testunit/tests_for_parallel/ptest_first.rb b/jni/ruby/test/testunit/tests_for_parallel/ptest_first.rb new file mode 100644 index 0000000..66c7704 --- /dev/null +++ b/jni/ruby/test/testunit/tests_for_parallel/ptest_first.rb @@ -0,0 +1,7 @@ +require 'test/unit' + +class TestA < Test::Unit::TestCase + def test_nothing_test + end +end + diff --git a/jni/ruby/test/testunit/tests_for_parallel/ptest_forth.rb b/jni/ruby/test/testunit/tests_for_parallel/ptest_forth.rb new file mode 100644 index 0000000..46c88da --- /dev/null +++ b/jni/ruby/test/testunit/tests_for_parallel/ptest_forth.rb @@ -0,0 +1,29 @@ +require 'test/unit' + +class TestE < Test::Unit::TestCase + class UnknownError < RuntimeError; end + + def test_not_fail + assert_equal(1,1) + end + + def test_always_skip + skip "always" + end + + def test_always_fail + assert_equal(0,1) + end + + def test_skip_after_unknown_error + begin + raise UnknownError, "unknown error" + rescue + skip "after raise" + end + end + + def test_unknown_error + raise UnknownError, "unknown error" + end +end diff --git a/jni/ruby/test/testunit/tests_for_parallel/ptest_second.rb b/jni/ruby/test/testunit/tests_for_parallel/ptest_second.rb new file mode 100644 index 0000000..7004d68 --- /dev/null +++ b/jni/ruby/test/testunit/tests_for_parallel/ptest_second.rb @@ -0,0 +1,11 @@ +require 'test/unit' + +class TestB < Test::Unit::TestCase + def test_nothing + end +end + +class TestC < Test::Unit::TestCase + def test_nothing + end +end diff --git a/jni/ruby/test/testunit/tests_for_parallel/ptest_third.rb b/jni/ruby/test/testunit/tests_for_parallel/ptest_third.rb new file mode 100644 index 0000000..338fc32 --- /dev/null +++ b/jni/ruby/test/testunit/tests_for_parallel/ptest_third.rb @@ -0,0 +1,10 @@ +require 'test/unit' + +class TestD < Test::Unit::TestCase + def test_fail_at_worker + #if /test\/unit\/parallel\.rb/ =~ $0 + if on_parallel_worker? + assert_equal(0,1) + end + end +end diff --git a/jni/ruby/test/testunit/tests_for_parallel/runner.rb b/jni/ruby/test/testunit/tests_for_parallel/runner.rb new file mode 100644 index 0000000..e262e1e --- /dev/null +++ b/jni/ruby/test/testunit/tests_for_parallel/runner.rb @@ -0,0 +1,13 @@ +require 'rbconfig' + +$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../lib" + +require 'test/unit' + +src_testdir = File.dirname(File.expand_path(__FILE__)) + +class Test::Unit::Runner + @@testfile_prefix = "ptest" +end + +exit Test::Unit::AutoRunner.run(true, src_testdir) |