Граф коммитов

173 Коммитов

Автор SHA1 Сообщение Дата
nobu e4aac80a71 test/unit.rb: restore parallel option
* test/lib/test/unit.rb (_run_parallel): restore parallel option
  after retrying for --repeat-count option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24 09:22:21 +00:00
nobu 52acc428f0 test/unit.rb: --subprocess-timeout-scale option
* test/lib/envutil.rb (EnvUtil#invoke_ruby): add subprocess
  timeout scaling factor.

* test/lib/test/unit.rb (Test::Unit::SubprocessOption): add
  --subprocess-timeout-scale option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24 00:51:01 +00:00
nobu 642b3a260b test/unit.rb: --repeat-count option
* test/lib/test/unit.rb (Test::Unit::RepeatOption): --repeat-count
  option to repeat COUNT times while success.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24 00:50:59 +00:00
nobu 2af72edd72 assertions.rb: prepare_syntax_check
* test/lib/test/unit/assertions.rb (prepare_syntax_check): extract
  common preparation of arguments from assert_valid_syntax and
  assert_syntax_error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23 03:22:36 +00:00
nobu 6b5f927718 assertions.rb: syntax check by iseq
* test/lib/test/unit/assertions.rb (assert_valid_syntax): use
  RubyVM::InstructionSequence.compile to get rid of executing the
  code, instead of catch&throw.  sample/trick2015/kinaba/entry.rb
  no longer raises an Invalid return.

* test/lib/test/unit/assertions.rb (assert_syntax_error): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23 03:22:35 +00:00
nobu 8c5e6ba015 test/unit.rb: separator [ci skip]
* test/lib/test/unit.rb (ExcludesOption#setup_options): add
  separator for --excludes-dir in help message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 05:09:18 +00:00
nobu 18c9bf5de3 test/unit.rb: fix -n option
* test/lib/test/unit.rb (non_options): turn name patterns into
  Regexps.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-08 08:25:21 +00:00
nobu c9530982b6 assertions.rb: defered message in FailDesc
* test/lib/test/unit/assertions.rb (FailDesc): allow to defer
  message generation, as well as other assertion methods.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-07 14:26:44 +00:00
kazu b1272e93eb Remove closed checks and use `&.`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-05 12:35:03 +00:00
nobu af015a9adc assertions.rb: assert_all_assertions
* test/lib/test/unit/assertions.rb (assert_all_assertions): prefix
  assert to be filtered out.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-02 01:31:00 +00:00
nobu 703cc6748f test/unit.rb: no file name if idle [ci skip]
* test/lib/test/unit.rb (Test::Unit::Parallel::Worker#to_s): show
  file name if not idling.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-28 15:28:54 +00:00
nobu 3bf10b0464 test/unit.rb: show idling workers
* test/lib/test/unit.rb (Test::Unit::Parallel#deal): update the
  job status after a task finished, to show idling workers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-24 01:52:19 +00:00
nobu f0e1d72316 memory_status.c: system call
* ext/-test-/memory_status/memory_status.c: get memory sizes by
  mach task_info system call.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-08 01:34:27 +00:00
nobu 2ca58e4290 assertions.rb: success option
* test/lib/test/unit/assertions.rb (assert_in_out_err): add
  success option to check the exit status.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-27 08:35:30 +00:00
nobu 4b298ad77a Use qualified names
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-30 06:22:30 +00:00
rhe e9c410659e assertions.rb: add an alias pend for skip
* test/lib/test/unit/assertions.rb (pend): Add an alias 'pend' for
  'skip'. This is required for test-unit compatibility. In particular,
  ext/openssl uses it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-29 05:47:08 +00:00
nobu d81e5593b7 test/unit.rb: no verbose in worker processes
* test/lib/test/unit.rb (Test::Unit::Parallel::Worker.launch):
  disable verbose flag in worker processes, get rid of unexpected
  output within marshaled results.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-08 05:04:36 +00:00
hsbt a7b5d45466 * test/lib/test/unit.rb: added test files with `_test` suffix for json
upstream.
* test/json: merge original test files from json upstream.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-13 13:27:07 +00:00
nobu 006634b489 -test-/integer
* ext/-test-/integer/core_ext.c: move testutil/integer.c.
* test/lib/-test-/integer.rb: extract implementation details from
  test/unit/assertions.rb.  [Bug #12408]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-22 07:27:02 +00:00
nobu 4176db205e assertions.rb: leave timeout to invoke_ruby
* test/lib/test/unit/assertions.rb (assert_separately): leave
  timeout to invoke_ruby, which handles outputs and status of the
  target process since r51539.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19 03:46:20 +00:00
akr f9727c12cc [Feature #12005] Unify Fixnum and Bignum into Integer
* [Feature #12005] Unify Fixnum and Bignum into Integer

* include/ruby/ruby.h (rb_class_of): Return rb_cInteger for fixnums.

* insns.def (INTEGER_REDEFINED_OP_FLAG): Unified from
  FIXNUM_REDEFINED_OP_FLAG and BIGNUM_REDEFINED_OP_FLAG.

* vm_core.h: Ditto.

* vm_insnhelper.c (opt_eq_func): Use INTEGER_REDEFINED_OP_FLAG instead
  of FIXNUM_REDEFINED_OP_FLAG.

* vm.c (vm_redefinition_check_flag): Use rb_cInteger instead of
  rb_cFixnum and rb_cBignum.
  (C): Use Integer instead of Fixnum and Bignum.

* numeric.c (fix_succ): Removed.
  (Init_Numeric): Define Fixnum as Integer.

* bignum.c (bignew): Use rb_cInteger instead of Rb_cBignum.
  (rb_int_coerce): replaced from rb_big_coerce and return fixnums
  as-is.
  (Init_Bignum): Define Bignum as Integer.
  Don't define ===.

* error.c (builtin_class_name): Return "Integer" for fixnums.

* sprintf.c (ruby__sfvextra): Use rb_cInteger instead of rb_cFixnum.

* ext/-test-/testutil: New directory to test.
  Currently it provides utilities for fixnum and bignum.

* ext/json/generator/generator.c: Define mInteger_to_json.

* lib/mathn.rb (Fixnum#/): Redefinition removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17 06:53:48 +00:00
akr 5ea4824508 test/lib/test/unit/assertions.rb defines assert_fixnum and assert_bignum.
* test/lib/test/unit/assertions.rb (assert_fixnum): Defined.
  (assert_bignum): Defined.

* test/ruby/test_bignum.rb: Use assert_bignum.

* test/ruby/test_integer_comb.rb: Use assert_fixnum and assert_bignum.

* test/ruby/test_optimization.rb: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 16:01:36 +00:00
akr de2f7416d2 envutil.rb defines Integer::{FIXNUM_MIN,FIXNUM_MAX}.
* test/lib/envutil.rb: Define Integer::{FIXNUM_MIN,FIXNUM_MAX}.

* test/ruby/test_bignum.rb: Use Integer::{FIXNUM_MIN,FIXNUM_MAX}.

* test/ruby/test_bignum.rb: Ditto.

* test/ruby/test_integer_comb.rb: Ditto.

* test/ruby/test_marshal.rb: Ditto.

* test/ruby/test_optimization.rb: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 15:16:17 +00:00
usa b1ec36b2e6 * test/lib/test/unit.rb (Options#non_options): fixed wrong regexp.
if both positives and negatives were specified, postives had to
  be spcicifed from the beginning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 14:54:44 +00:00
nobu e06aaf699d assertions.rb: return the exception
* test/lib/test/unit/assertions.rb (assert_syntax_error): return
  the rescued exception object as well as assert_raise.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-20 04:37:26 +00:00
nobu 316bb88f5a test/unit.rb: show warning locations
* test/lib/test/unit.rb (ExcludedMethods.load): supply the path to
  show the warning locations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11 08:27:17 +00:00
nobu 404bf57aaf assertions.rb: set default internal encoding
* test/lib/test/unit/assertions.rb (assert_raise_with_message):
  set default internal encoding to the excpected message, which
  affects String#inspect in messages.

* test/lib/test/unit/assertions.rb (assert_warning): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-09 01:25:11 +00:00
nobu 66225416bd test/unit.rb: defer failures in non-replace mode
* test/lib/test/unit.rb (Test::Unit::StatusLine#failed): print
  failed messages only if replacing mode, otherwise defer them
  until the end, to get rid of interleaving failures with progress
  messages.  refix r54195.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-22 01:11:03 +00:00
nobu d5a9735112 test/unit.rb: show crashed file
* test/lib/test/unit.rb (after_worker_down): show failed file name
  if worker crashed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-21 09:55:29 +00:00
nobu 2019f8cb1c test/unit.rb: defer failures in verbose mode
* test/lib/test/unit.rb (Test::Unit::StatusLine#failed): defer
  failed messages until the end in verbose mode, to get rid of
  interleaving failures with progress messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-19 12:56:25 +00:00
nobu 755a81a77a assertions.rb: fix result of assert_nothing_raised
* test/lib/test/unit/assertions.rb (assert_nothing_raised): do not
  discard the result of the given block.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-17 05:22:57 +00:00
akr db271576bb * test/lib/test/unit.rb: describe !/REGEXP/ in the help message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-11 17:58:49 +00:00
nobu 83e36bb5a6 testunit: negative filter
* test/lib/test/unit.rb (Options#non_options): make regexp name
  options prefixed with "!" negative filters.
* common.mk (TEST_EXCLUDES): use negative filter to exclude memory
  leak tests.  -x option excludes test files, not test methods.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-11 08:03:11 +00:00
nobu e1e223a874 memory_status.rb: independent of MiniTest
* test/lib/memory_status.rb: make Memory::Status independent of
  MiniTest::Skip.
* test/lib/test/unit/assertions.rb (assert_no_memory_leak): skip
  if Memory::Status is not available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-09 04:22:50 +00:00
nobu b3f4db9227 memory_status.rb: remove unused values
* test/lib/memory_status.rb: remove initial status values, which
  are not used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-09 03:48:33 +00:00
nobu 80a8390c53 test/unit: not return the cursor if verbose
* test/lib/test/unit.rb (update_status): do not return the cursor
  if verbose mode, not results and times to overwrite test names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-03 03:08:52 +00:00
nobu 61b9074ca6 test/unit: return the cursor
* test/lib/test/unit.rb (update_status): keep the cursor to the
  beginning of the line for each update, so that unexpected output
  like an error message will overwrite but not be concatenated to
  the status.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-02 07:03:22 +00:00
nobu bafa7f90ef test/unit: refine output in job_status=normal
* test/lib/test/unit.rb (Test::Unit::StatusLine#jobs_status): show
  status of only changed woker, not to show same lines repeatedly,
  in normal job_status mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-27 05:10:44 +00:00
nobu de12196865 test/unit: fix for the test
* test/lib/test/unit.rb (_run_parallel): make sure retrying
  message is a separate line.

* test/lib/test/unit.rb (_prepare_run): do not add Output if
  testing.

* test/lib/test/unit.rb (Skipping#failed): defer showing reports
  when showing skips, to be sorted.

* test/testunit/test_hideskip.rb (test_hideskip): fix assertion
  for output misordered by mixing output destinations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-27 04:16:44 +00:00
nobu 9c55cb2e9e test/unit: refine output in verbose mode
* test/lib/test/unit.rb (Test::Unit::StatusLine#_prepare_run): add
  StatusLine::Output even if job_status is not replace, to filter
  extra outputs and newlines.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-27 02:01:57 +00:00
nobu fea80948c7 test/unit: add --jobs-status=none
* test/lib/test/unit.rb (Test::Unit::StatusLine#setup_options):
  add :none to --jobs-status option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-27 01:56:44 +00:00
nobu 0783358dcc test/unit: no newlines to be chomped
* test/lib/test/unit.rb (Test::Unit::StatusLine::Output#print):
  matched part never contains a newline to be chomped.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-27 01:56:43 +00:00
nobu c00d51c739 assertions.rb: fix assert_no_memory_leak
* test/lib/test/unit/assertions.rb (assert_no_memory_leak): fix
  path of memory_status.rb, as this method has been moved.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 08:29:58 +00:00
nobu eecfa1fc7a incompatible encoding workaround
* test/lib/minitest/unit.rb (puke): workaround incompatible
  encoding error messages.

* test/lib/test/unit/assertions.rb (AllFailures.message): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-05 04:45:10 +00:00
kazu 59e8cd3ea0 follow r53691
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-02 13:01:09 +00:00
naruse 563706fa19 suppress warning: assigned but unused variable
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29 15:21:52 +00:00
nobu 5aabf722a9 remove extra dot
* test/lib/test/unit/assertions.rb (all_assertions): remove tail
  dot as it is added in message again.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-17 16:11:57 +00:00
nobu 8d66627161 leakchecker.rb: remove temporary measure
* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#watcher):
  make watcher thread restartable.

* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#terminate):
  new method to terminate watcher thread.

* test/lib/leakchecker.rb (LeakChecker#find_threads): revert
  r46941.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-05 06:09:17 +00:00
nobu 1da4d51bf9 assertions.rb: show failed indexes
* test/lib/test/unit/assertions.rb (AllFailures): show indexes in
  total number of failure assertions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-20 01:43:45 +00:00
nobu d205e680d3 test/unit.rb: color on tty
* test/lib/test/unit.rb (Test::Unit::StatusLine#_prepare_run):
  colorize by default on tty.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-19 01:17:47 +00:00