win32-api 1.5.3-universal-mingw32 → 1.6.0-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +174 -169
- data/Gemfile +4 -0
- data/Gemfile.lock +24 -0
- data/README +129 -131
- data/Rakefile +185 -182
- data/appveyor.yml +42 -0
- data/ext/win32/api.c +1092 -1092
- data/lib/win32/api.rb +14 -8
- data/lib/win32/ruby21_32/win32/api.so +0 -0
- data/lib/win32/ruby21_64/win32/api.so +0 -0
- data/lib/win32/ruby22_32/win32/api.so +0 -0
- data/lib/win32/ruby22_64/win32/api.so +0 -0
- data/lib/win32/ruby23_32/win32/api.so +0 -0
- data/lib/win32/ruby23_64/win32/api.so +0 -0
- data/lib/win32/ruby2_32/win32/api.so +0 -0
- data/lib/win32/ruby2_64/win32/api.so +0 -0
- data/test/test_win32_api.rb +145 -145
- data/vendor/bundle/ruby/2.2.0/bin/devkit +23 -0
- data/vendor/bundle/ruby/2.2.0/bin/devkit.bat +6 -0
- data/vendor/bundle/ruby/2.2.0/bin/rake +23 -0
- data/vendor/bundle/ruby/2.2.0/bin/rake.bat +6 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/CHANGELOG +55 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/LICENSE +339 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/README.md +73 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/Rakefile +8 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/colorize.gemspec +35 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize/class_methods.rb +116 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize/instance_methods.rb +135 -0
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/test/test_colorize.rb +161 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Gemfile +4 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/README.md +34 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Rakefile +1 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Rspec-example-matchers.txt +184 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/bin/devkit +87 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/devkit.gemspec +27 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/core.rb +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/identity.rb +78 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/ssh_identity.rb +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/version.rb +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/core_spec.rb +46 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/identity_spec.rb +1 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/ssh_identity_spec.rb +1 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit_spec.rb +5 -0
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/spec_helper.rb +8 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/AUTHORS +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/COPYING +339 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Changelog.md +415 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Gemfile +9 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/INSTALL +59 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/LICENSE +7 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/README.rdoc +74 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Rakefile +30 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/TODO +6 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/ansi_colors.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/asking_for_arrays.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/basic_usage.rb +75 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/color_scheme.rb +32 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/get_character.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/limit.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/menus.rb +65 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/overwrite.rb +19 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/page_and_wrap.rb +322 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/password.rb +7 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/repeat_entry.rb +21 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/trapping_eof.rb +22 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/using_readline.rb +17 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/highline.gemspec +37 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline.rb +1048 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/color_scheme.rb +134 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/compatibility.rb +16 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/import.rb +41 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/menu.rb +381 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/question.rb +480 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/simulate.rb +48 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/style.rb +192 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/version.rb +4 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/setup.rb +1360 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/highline.css +65 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/images/logo.png +0 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/index.html +58 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/string_methods.rb +32 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_color_scheme.rb +96 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_highline.rb +1402 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_import.rb +52 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_menu.rb +439 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_simulator.rb +23 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_string_highline.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_style.rb +578 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/BSDL +22 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/COPYING +57 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/Gemfile +9 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/LEGAL +4 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/README.rdoc +19 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/Rakefile +16 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/benchmarks/bm_yhpg.rb +59 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/benchmarks/helper.rb +8 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert.rb +338 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert/enable_tracepoint_events.rb +82 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert/version.rb +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/power_assert.gemspec +23 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/test/helper.rb +10 -0
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/test/test_power_assert.rb +512 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/CONTRIBUTING.rdoc +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/History.rdoc +719 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/Manifest.txt +154 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/README.rdoc +157 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/Rakefile +82 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/bin/rake +33 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/jamis.rb +591 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rake.1 +141 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rakefile.rdoc +624 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.6.rdoc +37 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.0.rdoc +112 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.1.rdoc +52 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.2.rdoc +49 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.3.rdoc +102 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.4.rdoc +60 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.5.rdoc +55 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.6.rdoc +64 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.0.rdoc +178 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.1.rdoc +58 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.2.rdoc +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.3.rdoc +191 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.1.0.rdoc +61 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake.rb +73 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/application.rb +787 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/backtrace.rb +23 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/clean.rb +76 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/cloneable.rb +16 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/compositepublisher.rb +21 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/ftptools.rb +137 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/sshpublisher.rb +60 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/cpu_counter.rb +120 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/default_loader.rb +14 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/dsl_definition.rb +194 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/early_time.rb +21 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_creation_task.rb +24 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_list.rb +436 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_task.rb +46 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_utils.rb +123 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/invocation_chain.rb +56 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/late_time.rb +17 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/linked_list.rb +111 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/loaders/makefile.rb +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/multi_task.rb +13 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/packagetask.rb +199 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/phony.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/private_reader.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/promise.rb +99 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/pseudo_status.rb +29 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rake_module.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rake_test_loader.rb +22 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/scope.rb +42 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task.rb +391 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_argument_error.rb +7 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_arguments.rb +102 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_manager.rb +316 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/tasklib.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/testtask.rb +204 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/thread_history_display.rb +48 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/thread_pool.rb +163 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/trace_output.rb +22 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/version.rb +7 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/win32.rb +50 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/rakelib/test_times.rake +25 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/file_creation.rb +34 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/helper.rb +134 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/support/rakefile_definitions.rb +476 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/support/ruby_runner.rb +34 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_private_reader.rb +42 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake.rb +40 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_application.rb +659 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_application_options.rb +468 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_backtrace.rb +119 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_clean.rb +61 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_cpu_counter.rb +68 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_definitions.rb +84 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_directory_task.rb +76 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_dsl.rb +40 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_early_time.rb +31 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_creation_task.rb +56 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list.rb +687 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list_path_map.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_task.rb +197 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_utils.rb +318 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_ftp_file.rb +74 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_functional.rb +484 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_invocation_chain.rb +64 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_late_time.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_linked_list.rb +84 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_makefile_loader.rb +46 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_multi_task.rb +64 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_name_space.rb +57 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_package_task.rb +79 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map.rb +168 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map_explode.rb +34 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map_partial.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_pseudo_status.rb +21 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_rake_test_loader.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_reduce_compat.rb +26 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_require.rb +40 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_rules.rb +388 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_scope.rb +44 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task.rb +430 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_argument_parsing.rb +119 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_arguments.rb +134 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_manager.rb +178 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_with_arguments.rb +172 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_test_task.rb +130 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_thread_pool.rb +145 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_top_level_functions.rb +71 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_win32.rb +72 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_thread_history_display.rb +101 -0
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_trace_output.rb +52 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/COPYING +64 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/GPL +339 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/LGPL +502 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/PSFL +271 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/README.md +101 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/Rakefile +71 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test-unit.rb +34 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit.rb +505 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/assertion-failed-error.rb +25 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/assertions.rb +2218 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/attribute-matcher.rb +26 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/attribute.rb +158 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/auto-runner-loader.rb +17 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/autorunner.rb +536 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/code-snippet-fetcher.rb +58 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector.rb +73 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/descendant.rb +19 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/dir.rb +108 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/load.rb +202 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/objectspace.rb +34 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/xml.rb +249 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/color-scheme.rb +198 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/color.rb +134 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/data.rb +262 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/diff.rb +746 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/error.rb +158 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/exception-handler.rb +82 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/failure.rb +169 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/fault-location-detector.rb +100 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/fixture.rb +295 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/notification.rb +136 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/omission.rb +195 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/pending.rb +154 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/priority.rb +192 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/console.rb +59 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/emacs.rb +8 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/xml.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/test-suite-creator.rb +89 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testcase.rb +811 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testresult.rb +132 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testsuite.rb +175 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/console/outputlevel.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/console/testrunner.rb +693 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/emacs/testrunner.rb +49 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunner.rb +53 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunnermediator.rb +114 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunnerutilities.rb +41 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/xml/testrunner.rb +224 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/backtracefilter.rb +59 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/method-owner-finder.rb +28 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/observable.rb +90 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/output.rb +31 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/procwrapper.rb +48 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/version.rb +5 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/adder.rb +13 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/subtracter.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_adder.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_subtracter.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_user.rb +23 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test-descendant.rb +178 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test-load.rb +442 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test_dir.rb +406 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test_objectspace.rb +100 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header-label.csv +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header-label.tsv +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header.csv +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header.tsv +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/no-header.csv +2 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/no-header.tsv +2 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/plus.csv +3 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/run-test.rb +22 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-assertions.rb +2160 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-attribute-matcher.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-attribute.rb +123 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-code-snippet.rb +37 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-color-scheme.rb +82 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-color.rb +47 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-data.rb +303 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-diff.rb +518 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-emacs-runner.rb +60 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-error.rb +26 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-failure.rb +33 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-fault-location-detector.rb +163 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-fixture.rb +713 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-notification.rb +33 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-omission.rb +81 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-pending.rb +70 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-priority.rb +173 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-case.rb +1171 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-result.rb +113 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-suite-creator.rb +97 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-suite.rb +150 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/testunit-test-util.rb +31 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/ui/test_testrunmediator.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test-method-owner-finder.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test-output.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_backtracefilter.rb +52 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_observable.rb +102 -0
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_procwrapper.rb +36 -0
- data/vendor/bundle/ruby/2.2.0/specifications/colorize-0.7.7.gemspec +38 -0
- data/vendor/bundle/ruby/2.2.0/specifications/devkit-0.1.0.gemspec +46 -0
- data/vendor/bundle/ruby/2.2.0/specifications/highline-1.7.8.gemspec +37 -0
- data/vendor/bundle/ruby/2.2.0/specifications/power_assert-0.3.0.gemspec +41 -0
- data/vendor/bundle/ruby/2.2.0/specifications/rake-11.1.2.gemspec +43 -0
- data/vendor/bundle/ruby/2.2.0/specifications/test-unit-3.1.9.gemspec +47 -0
- data/win32-api.gemspec +27 -27
- metadata +345 -5
- data/lib/win32/ruby18/win32/api.so +0 -0
- data/lib/win32/ruby19/win32/api.so +0 -0
@@ -0,0 +1,811 @@
|
|
1
|
+
#--
|
2
|
+
#
|
3
|
+
# Author:: Nathaniel Talbott.
|
4
|
+
# Copyright::
|
5
|
+
# * Copyright (c) 2000-2003 Nathaniel Talbott. All rights reserved.
|
6
|
+
# * Copyright (c) 2008-2012 Kouhei Sutou <tt><kou@clear-code.com></tt>
|
7
|
+
# License:: Ruby license.
|
8
|
+
|
9
|
+
require 'test/unit/attribute'
|
10
|
+
require 'test/unit/fixture'
|
11
|
+
require 'test/unit/exception-handler'
|
12
|
+
require 'test/unit/assertions'
|
13
|
+
require 'test/unit/failure'
|
14
|
+
require 'test/unit/error'
|
15
|
+
require 'test/unit/pending'
|
16
|
+
require 'test/unit/omission'
|
17
|
+
require 'test/unit/notification'
|
18
|
+
require 'test/unit/priority'
|
19
|
+
require 'test/unit/data'
|
20
|
+
require 'test/unit/testsuite'
|
21
|
+
require 'test/unit/test-suite-creator'
|
22
|
+
require 'test/unit/assertion-failed-error'
|
23
|
+
require 'test/unit/auto-runner-loader'
|
24
|
+
require 'test/unit/util/backtracefilter'
|
25
|
+
require 'test/unit/util/output'
|
26
|
+
require 'test/unit/util/method-owner-finder'
|
27
|
+
|
28
|
+
module Test
|
29
|
+
module Unit
|
30
|
+
|
31
|
+
# Ties everything together. If you subclass and add your own
|
32
|
+
# test methods, it takes care of making them into tests and
|
33
|
+
# wrapping those tests into a suite. It also does the
|
34
|
+
# nitty-gritty of actually running an individual test and
|
35
|
+
# collecting its results into a Test::Unit::TestResult object.
|
36
|
+
#
|
37
|
+
# You can run two hooks before/after a TestCase run.
|
38
|
+
#
|
39
|
+
# Example:
|
40
|
+
# class TestMyClass < Test::Unit::TestCase
|
41
|
+
# class << self
|
42
|
+
# def startup
|
43
|
+
# ...
|
44
|
+
# end
|
45
|
+
#
|
46
|
+
# def shutdown
|
47
|
+
# ...
|
48
|
+
# end
|
49
|
+
# end
|
50
|
+
#
|
51
|
+
# def setup
|
52
|
+
# ...
|
53
|
+
# end
|
54
|
+
#
|
55
|
+
# def cleanup
|
56
|
+
# ...
|
57
|
+
# end
|
58
|
+
#
|
59
|
+
# def teardown
|
60
|
+
# ...
|
61
|
+
# end
|
62
|
+
#
|
63
|
+
# def test_my_method1
|
64
|
+
# ...
|
65
|
+
# end
|
66
|
+
#
|
67
|
+
# def test_my_method2
|
68
|
+
# ...
|
69
|
+
# end
|
70
|
+
# end
|
71
|
+
#
|
72
|
+
# Here is a call order:
|
73
|
+
# * startup
|
74
|
+
# * setup
|
75
|
+
# * test_my_method1
|
76
|
+
# * cleanup
|
77
|
+
# * teardown
|
78
|
+
# * setup
|
79
|
+
# * test_my_method2
|
80
|
+
# * cleanup
|
81
|
+
# * teardown
|
82
|
+
# * shutdown
|
83
|
+
class TestCase
|
84
|
+
include Attribute
|
85
|
+
include Fixture
|
86
|
+
include ExceptionHandler
|
87
|
+
include ErrorHandler
|
88
|
+
include FailureHandler
|
89
|
+
include TestCasePendingSupport
|
90
|
+
include TestCaseOmissionSupport
|
91
|
+
include TestCaseNotificationSupport
|
92
|
+
include Priority
|
93
|
+
include Data
|
94
|
+
include Assertions
|
95
|
+
include Util::BacktraceFilter
|
96
|
+
include Util::Output
|
97
|
+
|
98
|
+
STARTED = name + "::STARTED" # :nodoc:
|
99
|
+
FINISHED = name + "::FINISHED" # :nodoc:
|
100
|
+
STARTED_OBJECT = name + "::STARTED::OBJECT" # :nodoc:
|
101
|
+
FINISHED_OBJECT = name + "::FINISHED::OBJECT" # :nodoc:
|
102
|
+
|
103
|
+
DESCENDANTS = [] # :nodoc:
|
104
|
+
AVAILABLE_ORDERS = [:alphabetic, :random, :defined] # :nodoc:
|
105
|
+
|
106
|
+
class << self
|
107
|
+
def inherited(sub_class) # :nodoc:
|
108
|
+
DESCENDANTS << sub_class
|
109
|
+
super
|
110
|
+
end
|
111
|
+
|
112
|
+
@@added_method_names = {}
|
113
|
+
def method_added(name) # :nodoc:
|
114
|
+
super
|
115
|
+
added_method_names = (@@added_method_names[self] ||= {})
|
116
|
+
stringified_name = name.to_s
|
117
|
+
if added_method_names.key?(stringified_name)
|
118
|
+
attribute(:redefined, {:backtrace => caller}, {}, stringified_name)
|
119
|
+
end
|
120
|
+
source_location = find_attribute(stringified_name, :source_location)
|
121
|
+
if source_location
|
122
|
+
path, line = source_location
|
123
|
+
elsif respond_to?(:caller_locations, true)
|
124
|
+
location = caller_locations(1, 1)[0]
|
125
|
+
path = location.absolute_path || location.path
|
126
|
+
line = location.lineno
|
127
|
+
else
|
128
|
+
# TODO: Remove me when Ruby 1.9 support is dropped
|
129
|
+
path, line, = caller[0].split(/:(\d+)/, 2)
|
130
|
+
line = line.to_i if line
|
131
|
+
end
|
132
|
+
method_locations << {
|
133
|
+
:method_name => stringified_name,
|
134
|
+
:path => File.expand_path(path),
|
135
|
+
:line => line,
|
136
|
+
}
|
137
|
+
added_method_names[stringified_name] = true
|
138
|
+
AutoRunnerLoader.check(self, stringified_name)
|
139
|
+
end
|
140
|
+
|
141
|
+
def added_method_names # :nodoc:
|
142
|
+
(@@added_method_names[self] ||= {}).keys
|
143
|
+
end
|
144
|
+
|
145
|
+
# Rolls up all of the test* methods in the fixture into
|
146
|
+
# one suite, creating a new instance of the fixture for
|
147
|
+
# each method.
|
148
|
+
def suite
|
149
|
+
suite_creator = TestSuiteCreator.new(self)
|
150
|
+
suite_creator.create
|
151
|
+
end
|
152
|
+
|
153
|
+
# Called before every test case runs. Can be used
|
154
|
+
# to set up fixture information used in test case
|
155
|
+
# scope.
|
156
|
+
#
|
157
|
+
# Here is an example test case:
|
158
|
+
# class TestMyClass < Test::Unit::TestCase
|
159
|
+
# class << self
|
160
|
+
# def startup
|
161
|
+
# ...
|
162
|
+
# end
|
163
|
+
# end
|
164
|
+
#
|
165
|
+
# def setup
|
166
|
+
# ...
|
167
|
+
# end
|
168
|
+
#
|
169
|
+
# def test_my_class1
|
170
|
+
# ...
|
171
|
+
# end
|
172
|
+
#
|
173
|
+
# def test_my_class2
|
174
|
+
# ...
|
175
|
+
# end
|
176
|
+
# end
|
177
|
+
#
|
178
|
+
# Here is a call order:
|
179
|
+
# * startup
|
180
|
+
# * setup
|
181
|
+
# * test_my_class1 (or test_my_class2)
|
182
|
+
# * setup
|
183
|
+
# * test_my_class2 (or test_my_class1)
|
184
|
+
#
|
185
|
+
# Note that you should not assume test order. Tests
|
186
|
+
# should be worked in any order.
|
187
|
+
def startup
|
188
|
+
end
|
189
|
+
|
190
|
+
# Called after every test case runs. Can be used to tear
|
191
|
+
# down fixture information used in test case scope.
|
192
|
+
#
|
193
|
+
# Here is an example test case:
|
194
|
+
# class TestMyClass < Test::Unit::TestCase
|
195
|
+
# class << self
|
196
|
+
# def shutdown
|
197
|
+
# ...
|
198
|
+
# end
|
199
|
+
# end
|
200
|
+
#
|
201
|
+
# def teardown
|
202
|
+
# ...
|
203
|
+
# end
|
204
|
+
#
|
205
|
+
# def test_my_class1
|
206
|
+
# ...
|
207
|
+
# end
|
208
|
+
#
|
209
|
+
# def test_my_class2
|
210
|
+
# ...
|
211
|
+
# end
|
212
|
+
# end
|
213
|
+
#
|
214
|
+
# Here is a call order:
|
215
|
+
# * test_my_class1 (or test_my_class2)
|
216
|
+
# * teardown
|
217
|
+
# * test_my_class2 (or test_my_class1)
|
218
|
+
# * teardown
|
219
|
+
# * shutdown
|
220
|
+
#
|
221
|
+
# Note that you should not assume test order. Tests
|
222
|
+
# should be worked in any order.
|
223
|
+
def shutdown
|
224
|
+
end
|
225
|
+
|
226
|
+
@@test_orders = {}
|
227
|
+
|
228
|
+
# Returns the current test order. This returns
|
229
|
+
# +:alphabetic+ by default.
|
230
|
+
def test_order
|
231
|
+
@@test_orders[self] || AVAILABLE_ORDERS.first
|
232
|
+
end
|
233
|
+
|
234
|
+
# Sets the current test order.
|
235
|
+
#
|
236
|
+
# Here are the available _order_:
|
237
|
+
# [:alphabetic]
|
238
|
+
# Default. Tests are sorted in alphabetic order.
|
239
|
+
# [:random]
|
240
|
+
# Tests are sorted in random order.
|
241
|
+
# [:defined]
|
242
|
+
# Tests are sorted in defined order.
|
243
|
+
def test_order=(order)
|
244
|
+
@@test_orders[self] = order
|
245
|
+
end
|
246
|
+
|
247
|
+
# Defines a test in declarative syntax or marks
|
248
|
+
# following method as a test method.
|
249
|
+
#
|
250
|
+
# In declarative syntax usage, the following two
|
251
|
+
# test definitions are the almost same:
|
252
|
+
#
|
253
|
+
# description "register user"
|
254
|
+
# def test_register_user
|
255
|
+
# ...
|
256
|
+
# end
|
257
|
+
#
|
258
|
+
# test "register user" do
|
259
|
+
# ...
|
260
|
+
# end
|
261
|
+
#
|
262
|
+
# In test method mark usage, the "my_test_method" is
|
263
|
+
# treated as a test method:
|
264
|
+
#
|
265
|
+
# test
|
266
|
+
# def my_test_method
|
267
|
+
# assert_equal("call me", ...)
|
268
|
+
# end
|
269
|
+
def test(*test_description_or_targets, &block)
|
270
|
+
if block_given?
|
271
|
+
test_description = test_description_or_targets.first
|
272
|
+
if test_description.nil?
|
273
|
+
raise ArgumentError, "test description is missing"
|
274
|
+
end
|
275
|
+
n_arguments = test_description_or_targets.size
|
276
|
+
if n_arguments > 1
|
277
|
+
message = "wrong number of arguments (#{n_arguments} for 1)"
|
278
|
+
raise ArgumentError, message
|
279
|
+
end
|
280
|
+
method_name = "test: #{test_description}"
|
281
|
+
description(test_description, method_name)
|
282
|
+
attribute(:test, true, {}, method_name)
|
283
|
+
if block.respond_to?(:source_location)
|
284
|
+
attribute(:source_location, block.source_location, {}, method_name)
|
285
|
+
end
|
286
|
+
define_method(method_name, &block)
|
287
|
+
else
|
288
|
+
targets = test_description_or_targets
|
289
|
+
attribute(:test, true, {}, *targets)
|
290
|
+
targets.each do |target|
|
291
|
+
AutoRunnerLoader.check(self, target)
|
292
|
+
end
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
# Describes a test.
|
297
|
+
#
|
298
|
+
# The following example associates "register a
|
299
|
+
# normal user" description with "test_register"
|
300
|
+
# test.
|
301
|
+
#
|
302
|
+
# description "register a normal user"
|
303
|
+
# def test_register
|
304
|
+
# ...
|
305
|
+
# end
|
306
|
+
def description(value, target=nil)
|
307
|
+
targets = [target].compact
|
308
|
+
attribute(:description, value, {}, *targets)
|
309
|
+
end
|
310
|
+
|
311
|
+
# Defines a sub test case.
|
312
|
+
#
|
313
|
+
# This is a syntax sugar. The both of the following codes are
|
314
|
+
# the same in meaning:
|
315
|
+
#
|
316
|
+
# Standard:
|
317
|
+
# class TestParent < Test::UnitTestCase
|
318
|
+
# class TestChild < self
|
319
|
+
# def test_in_child
|
320
|
+
# end
|
321
|
+
# end
|
322
|
+
# end
|
323
|
+
#
|
324
|
+
# Syntax sugar:
|
325
|
+
# class TestParent < Test::UnitTestCase
|
326
|
+
# sub_test_case("TestChild") do
|
327
|
+
# def test_in_child
|
328
|
+
# end
|
329
|
+
# end
|
330
|
+
# end
|
331
|
+
#
|
332
|
+
# The difference of them are the following:
|
333
|
+
#
|
334
|
+
# * Test case created by {sub_test_case} is an anonymous class.
|
335
|
+
# So you can't refer the test case by name.
|
336
|
+
# * The class name of class style must follow
|
337
|
+
# constant naming rule in Ruby. But the name of test case
|
338
|
+
# created by {sub_test_case} doesn't need to follow the rule.
|
339
|
+
# For example, you can use a space in name such as "child test".
|
340
|
+
#
|
341
|
+
# @param name [String] The name of newly created sub test case.
|
342
|
+
# @yield
|
343
|
+
# The block is evaluated under the newly created sub test
|
344
|
+
# case class context.
|
345
|
+
# @return [Test::Unit::TestCase] Created sub test case class.
|
346
|
+
def sub_test_case(name, &block)
|
347
|
+
parent_test_case = self
|
348
|
+
sub_test_case = Class.new(self) do
|
349
|
+
singleton_class = class << self; self; end
|
350
|
+
singleton_class.__send__(:define_method, :name) do
|
351
|
+
[parent_test_case.name, name].compact.join("::")
|
352
|
+
end
|
353
|
+
end
|
354
|
+
sub_test_case.class_eval(&block)
|
355
|
+
sub_test_case
|
356
|
+
end
|
357
|
+
|
358
|
+
# Checks whether a test that is matched the query is
|
359
|
+
# defined.
|
360
|
+
#
|
361
|
+
# @option query [String] :path (nil)
|
362
|
+
# the path where a test is defined in.
|
363
|
+
# @option query [Numeric] :line (nil)
|
364
|
+
# the line number where a test is defined at.
|
365
|
+
# @option query [String] :method_name (nil)
|
366
|
+
# the method name for a test.
|
367
|
+
def test_defined?(query)
|
368
|
+
query_path = query[:path]
|
369
|
+
query_line = query[:line]
|
370
|
+
query_method_name = query[:method_name]
|
371
|
+
|
372
|
+
available_locations = target_method_locations(query_path)
|
373
|
+
if query_line
|
374
|
+
available_locations = available_locations.sort_by do |location|
|
375
|
+
-location[:line]
|
376
|
+
end
|
377
|
+
available_location = available_locations.find do |location|
|
378
|
+
query_line >= location[:line]
|
379
|
+
end
|
380
|
+
return false if available_location.nil?
|
381
|
+
return false if available_location[:test_case] != self
|
382
|
+
available_locations = [available_location]
|
383
|
+
end
|
384
|
+
if query_method_name
|
385
|
+
available_location = available_locations.find do |location|
|
386
|
+
query_method_name == location[:method_name]
|
387
|
+
end
|
388
|
+
return false if available_location.nil?
|
389
|
+
available_locations = [available_location]
|
390
|
+
end
|
391
|
+
|
392
|
+
not available_locations.empty?
|
393
|
+
end
|
394
|
+
|
395
|
+
private
|
396
|
+
# @private
|
397
|
+
@@method_locations = {}
|
398
|
+
# @private
|
399
|
+
def method_locations
|
400
|
+
@@method_locations[self] ||= []
|
401
|
+
end
|
402
|
+
|
403
|
+
# @private
|
404
|
+
def target_method_locations(path)
|
405
|
+
if path.nil?
|
406
|
+
self_location = method_locations.first
|
407
|
+
path = self_location[:path] if self_location
|
408
|
+
end
|
409
|
+
return [] if path.nil?
|
410
|
+
|
411
|
+
target_locations = []
|
412
|
+
@@method_locations.each do |test_case, locations|
|
413
|
+
locations.each do |location|
|
414
|
+
absolete_path = File.expand_path(path)
|
415
|
+
location_path = location[:path]
|
416
|
+
location_basename = File.basename(location_path)
|
417
|
+
if location_path == absolete_path or location_basename == path
|
418
|
+
target_locations << location.merge(:test_case => test_case)
|
419
|
+
end
|
420
|
+
end
|
421
|
+
end
|
422
|
+
target_locations
|
423
|
+
end
|
424
|
+
end
|
425
|
+
|
426
|
+
attr_reader :method_name
|
427
|
+
|
428
|
+
# Creates a new instance of the fixture for running the
|
429
|
+
# test represented by test_method_name.
|
430
|
+
def initialize(test_method_name)
|
431
|
+
@method_name = test_method_name
|
432
|
+
@internal_data = InternalData.new
|
433
|
+
end
|
434
|
+
|
435
|
+
# Assigns test data to the test. It is used in internal.
|
436
|
+
def assign_test_data(label, data) # :nodoc:
|
437
|
+
@internal_data.assign_test_data(label, data)
|
438
|
+
end
|
439
|
+
|
440
|
+
# Returns the test is valid test. It is used in internal.
|
441
|
+
def valid? # :nodoc:
|
442
|
+
return false unless respond_to?(@method_name)
|
443
|
+
test_method = method(@method_name)
|
444
|
+
if @internal_data.have_test_data?
|
445
|
+
return false unless test_method.arity == 1
|
446
|
+
else
|
447
|
+
return false unless test_method.arity <= 0
|
448
|
+
end
|
449
|
+
owner = Util::MethodOwnerFinder.find(self, @method_name)
|
450
|
+
if owner.class != Module and self.class != owner
|
451
|
+
return false
|
452
|
+
end
|
453
|
+
true
|
454
|
+
end
|
455
|
+
|
456
|
+
# Runs the individual test method represented by this
|
457
|
+
# instance of the fixture, collecting statistics, failures
|
458
|
+
# and errors in result.
|
459
|
+
def run(result)
|
460
|
+
begin
|
461
|
+
@_result = result
|
462
|
+
@internal_data.test_started
|
463
|
+
yield(STARTED, name)
|
464
|
+
yield(STARTED_OBJECT, self)
|
465
|
+
processed_exception_in_setup = false
|
466
|
+
begin
|
467
|
+
catch do |tag|
|
468
|
+
run_setup do
|
469
|
+
begin
|
470
|
+
run_test
|
471
|
+
run_cleanup
|
472
|
+
add_pass
|
473
|
+
rescue Exception
|
474
|
+
@internal_data.interrupted
|
475
|
+
unless handle_exception($!)
|
476
|
+
processed_exception_in_setup = true
|
477
|
+
raise
|
478
|
+
end
|
479
|
+
throw(tag)
|
480
|
+
end
|
481
|
+
end
|
482
|
+
end
|
483
|
+
rescue Exception
|
484
|
+
if processed_exception_in_setup
|
485
|
+
raise
|
486
|
+
else
|
487
|
+
@internal_data.interrupted
|
488
|
+
raise unless handle_exception($!)
|
489
|
+
end
|
490
|
+
ensure
|
491
|
+
begin
|
492
|
+
run_teardown
|
493
|
+
rescue Exception
|
494
|
+
raise unless handle_exception($!)
|
495
|
+
end
|
496
|
+
end
|
497
|
+
@internal_data.test_finished
|
498
|
+
result.add_run
|
499
|
+
yield(FINISHED, name)
|
500
|
+
yield(FINISHED_OBJECT, self)
|
501
|
+
ensure
|
502
|
+
# @_result = nil # For test-spec's after_all :<
|
503
|
+
end
|
504
|
+
end
|
505
|
+
|
506
|
+
# Called before every test method runs. Can be used
|
507
|
+
# to set up fixture information.
|
508
|
+
#
|
509
|
+
# You can add additional setup tasks by the following
|
510
|
+
# code:
|
511
|
+
# class TestMyClass < Test::Unit::TestCase
|
512
|
+
# def setup
|
513
|
+
# ...
|
514
|
+
# end
|
515
|
+
#
|
516
|
+
# setup
|
517
|
+
# def my_setup1
|
518
|
+
# ...
|
519
|
+
# end
|
520
|
+
#
|
521
|
+
# setup do
|
522
|
+
# ... # setup callback1
|
523
|
+
# end
|
524
|
+
#
|
525
|
+
# setup
|
526
|
+
# def my_setup2
|
527
|
+
# ...
|
528
|
+
# end
|
529
|
+
#
|
530
|
+
# setup do
|
531
|
+
# ... # setup callback2
|
532
|
+
# end
|
533
|
+
#
|
534
|
+
# def test_my_class
|
535
|
+
# ...
|
536
|
+
# end
|
537
|
+
# end
|
538
|
+
#
|
539
|
+
# Here is a call order:
|
540
|
+
# * setup
|
541
|
+
# * my_setup1
|
542
|
+
# * setup callback1
|
543
|
+
# * my_setup2
|
544
|
+
# * setup callback2
|
545
|
+
# * test_my_class
|
546
|
+
def setup
|
547
|
+
end
|
548
|
+
|
549
|
+
# Called after every test method runs but the test
|
550
|
+
# method isn't marked as 'passed'. Can be used to
|
551
|
+
# clean up and/or verify tested condition.
|
552
|
+
# e.g. Can be used to verify mock.
|
553
|
+
#
|
554
|
+
# You can add additional cleanup tasks by the following
|
555
|
+
# code:
|
556
|
+
# class TestMyClass < Test::Unit::TestCase
|
557
|
+
# def cleanup
|
558
|
+
# ...
|
559
|
+
# end
|
560
|
+
#
|
561
|
+
# cleanup
|
562
|
+
# def my_cleanup1
|
563
|
+
# ...
|
564
|
+
# end
|
565
|
+
#
|
566
|
+
# cleanup do
|
567
|
+
# ... # cleanup callback1
|
568
|
+
# end
|
569
|
+
#
|
570
|
+
# cleanup
|
571
|
+
# def my_cleanup2
|
572
|
+
# ...
|
573
|
+
# end
|
574
|
+
#
|
575
|
+
# cleanup do
|
576
|
+
# ... # cleanup callback2
|
577
|
+
# end
|
578
|
+
#
|
579
|
+
# def test_my_class
|
580
|
+
# ...
|
581
|
+
# end
|
582
|
+
# end
|
583
|
+
#
|
584
|
+
# Here is a call order:
|
585
|
+
# * test_my_class
|
586
|
+
# * cleanup callback2
|
587
|
+
# * my_cleanup2
|
588
|
+
# * cleanup callback1
|
589
|
+
# * my_cleanup1
|
590
|
+
# * cleanup
|
591
|
+
def cleanup
|
592
|
+
end
|
593
|
+
|
594
|
+
# Called after every test method runs. Can be used to tear
|
595
|
+
# down fixture information.
|
596
|
+
#
|
597
|
+
# You can add additional teardown tasks by the following
|
598
|
+
# code:
|
599
|
+
# class TestMyClass < Test::Unit::TestCase
|
600
|
+
# def teardown
|
601
|
+
# ...
|
602
|
+
# end
|
603
|
+
#
|
604
|
+
# teardown
|
605
|
+
# def my_teardown1
|
606
|
+
# ...
|
607
|
+
# end
|
608
|
+
#
|
609
|
+
# teardown do
|
610
|
+
# ... # teardown callback1
|
611
|
+
# end
|
612
|
+
#
|
613
|
+
# teardown
|
614
|
+
# def my_teardown2
|
615
|
+
# ...
|
616
|
+
# end
|
617
|
+
#
|
618
|
+
# teardown do
|
619
|
+
# ... # teardown callback2
|
620
|
+
# end
|
621
|
+
#
|
622
|
+
# def test_my_class
|
623
|
+
# ...
|
624
|
+
# end
|
625
|
+
# end
|
626
|
+
#
|
627
|
+
# Here is a call order:
|
628
|
+
# * test_my_class
|
629
|
+
# * teardown callback2
|
630
|
+
# * my_teardown2
|
631
|
+
# * teardown callback1
|
632
|
+
# * my_teardown1
|
633
|
+
# * teardown
|
634
|
+
def teardown
|
635
|
+
end
|
636
|
+
|
637
|
+
def default_test
|
638
|
+
flunk("No tests were specified")
|
639
|
+
end
|
640
|
+
|
641
|
+
def size
|
642
|
+
1
|
643
|
+
end
|
644
|
+
|
645
|
+
# Returns a label of test data for the test. If the
|
646
|
+
# test isn't associated with any test data, it returns
|
647
|
+
# +nil+.
|
648
|
+
def data_label
|
649
|
+
@internal_data.test_data_label
|
650
|
+
end
|
651
|
+
|
652
|
+
# Returns a human-readable name for the specific test that
|
653
|
+
# this instance of TestCase represents.
|
654
|
+
def name
|
655
|
+
if @internal_data.have_test_data?
|
656
|
+
"#{@method_name}[#{data_label}](#{self.class.name})"
|
657
|
+
else
|
658
|
+
"#{@method_name}(#{self.class.name})"
|
659
|
+
end
|
660
|
+
end
|
661
|
+
|
662
|
+
# Returns a description for the test. A description
|
663
|
+
# will be associated by Test::Unit::TestCase.test or
|
664
|
+
# Test::Unit::TestCase.description.
|
665
|
+
#
|
666
|
+
# Returns a name for the test for no description test.
|
667
|
+
def description
|
668
|
+
self[:description] || name
|
669
|
+
end
|
670
|
+
|
671
|
+
# Overridden to return #name.
|
672
|
+
def to_s
|
673
|
+
name
|
674
|
+
end
|
675
|
+
|
676
|
+
# It's handy to be able to compare TestCase instances.
|
677
|
+
def ==(other)
|
678
|
+
return false unless other.kind_of?(self.class)
|
679
|
+
return false unless @method_name == other.method_name
|
680
|
+
return false unless data_label == other.data_label
|
681
|
+
self.class == other.class
|
682
|
+
end
|
683
|
+
|
684
|
+
# Returns a Time at the test was started.
|
685
|
+
def start_time
|
686
|
+
@internal_data.start_time
|
687
|
+
end
|
688
|
+
|
689
|
+
# Returns elapsed time for the test was ran.
|
690
|
+
def elapsed_time
|
691
|
+
@internal_data.elapsed_time
|
692
|
+
end
|
693
|
+
|
694
|
+
# Returns whether the test is interrupted.
|
695
|
+
def interrupted?
|
696
|
+
@internal_data.interrupted?
|
697
|
+
end
|
698
|
+
|
699
|
+
# Returns whether this individual test passed or
|
700
|
+
# not. Primarily for use in teardown so that artifacts
|
701
|
+
# can be left behind if the test fails.
|
702
|
+
def passed?
|
703
|
+
@internal_data.passed?
|
704
|
+
end
|
705
|
+
|
706
|
+
# Notify that a problem is occurred in the test. It means that
|
707
|
+
# the test is a failed test. If any failed tests exist in test
|
708
|
+
# suites, the test process exits with failure exit status.
|
709
|
+
#
|
710
|
+
# This is a public API for developers who extend test-unit.
|
711
|
+
#
|
712
|
+
# @return [void]
|
713
|
+
def problem_occurred
|
714
|
+
@internal_data.problem_occurred
|
715
|
+
end
|
716
|
+
|
717
|
+
# Notify that the test is passed. Normally, it is not needed
|
718
|
+
# because #run calls it automatically. If you want to override
|
719
|
+
# #run, it is not a good idea. Please contact test-unit
|
720
|
+
# developers. We will help you without your custom #run. For
|
721
|
+
# example, we may add a new hook in #run.
|
722
|
+
#
|
723
|
+
# This is a public API for developers who extend test-unit.
|
724
|
+
#
|
725
|
+
# @return [void]
|
726
|
+
def add_pass
|
727
|
+
current_result.add_pass
|
728
|
+
end
|
729
|
+
|
730
|
+
private
|
731
|
+
def current_result
|
732
|
+
@_result
|
733
|
+
end
|
734
|
+
|
735
|
+
def run_test
|
736
|
+
redefined_info = self[:redefined]
|
737
|
+
if redefined_info
|
738
|
+
notify("#{self.class}\##{@method_name} was redefined",
|
739
|
+
:backtrace => redefined_info[:backtrace])
|
740
|
+
end
|
741
|
+
if @internal_data.have_test_data?
|
742
|
+
__send__(@method_name, @internal_data.test_data)
|
743
|
+
else
|
744
|
+
__send__(@method_name)
|
745
|
+
end
|
746
|
+
end
|
747
|
+
|
748
|
+
def handle_exception(exception)
|
749
|
+
self.class.exception_handlers.each do |handler|
|
750
|
+
if handler.respond_to?(:call)
|
751
|
+
handled = handler.call(self, exception)
|
752
|
+
else
|
753
|
+
handled = __send__(handler, exception)
|
754
|
+
end
|
755
|
+
return true if handled
|
756
|
+
end
|
757
|
+
false
|
758
|
+
end
|
759
|
+
|
760
|
+
def add_assertion
|
761
|
+
current_result.add_assertion
|
762
|
+
end
|
763
|
+
|
764
|
+
class InternalData
|
765
|
+
attr_reader :start_time, :elapsed_time
|
766
|
+
attr_reader :test_data_label, :test_data
|
767
|
+
def initialize
|
768
|
+
@start_time = nil
|
769
|
+
@elapsed_time = nil
|
770
|
+
@passed = true
|
771
|
+
@interrupted = false
|
772
|
+
@test_data_label = nil
|
773
|
+
@test_data = nil
|
774
|
+
end
|
775
|
+
|
776
|
+
def passed?
|
777
|
+
@passed
|
778
|
+
end
|
779
|
+
|
780
|
+
def interrupted?
|
781
|
+
@interrupted
|
782
|
+
end
|
783
|
+
|
784
|
+
def assign_test_data(label, data)
|
785
|
+
@test_data_label = label
|
786
|
+
@test_data = data
|
787
|
+
end
|
788
|
+
|
789
|
+
def have_test_data?
|
790
|
+
not @test_data_label.nil?
|
791
|
+
end
|
792
|
+
|
793
|
+
def test_started
|
794
|
+
@start_time = Time.now
|
795
|
+
end
|
796
|
+
|
797
|
+
def test_finished
|
798
|
+
@elapsed_time = Time.now - @start_time
|
799
|
+
end
|
800
|
+
|
801
|
+
def problem_occurred
|
802
|
+
@passed = false
|
803
|
+
end
|
804
|
+
|
805
|
+
def interrupted
|
806
|
+
@interrupted = true
|
807
|
+
end
|
808
|
+
end
|
809
|
+
end
|
810
|
+
end
|
811
|
+
end
|