mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ext/coverage/coverage.c: remove COVERAGE_EXPERIMENTAL_MODE
A NEWS entry is also added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e44f2b7d10
commit
9b1d8ab7d0
4 changed files with 4 additions and 10 deletions
3
NEWS
3
NEWS
|
@ -152,6 +152,9 @@ with all sufficient information, see the ChangeLog file or Redmine
|
||||||
|
|
||||||
* Add Bundler to Standard Library. [Feature #12733]
|
* Add Bundler to Standard Library. [Feature #12733]
|
||||||
|
|
||||||
|
* Coverage
|
||||||
|
* Support branch coverage and method coverage [Feature #13901]
|
||||||
|
|
||||||
* DRb
|
* DRb
|
||||||
* ACL::ACLEntry.new no longer suppresses IPAddr::InvalidPrefixError.
|
* ACL::ACLEntry.new no longer suppresses IPAddr::InvalidPrefixError.
|
||||||
|
|
||||||
|
|
|
@ -25,15 +25,8 @@ static VALUE
|
||||||
rb_coverage_start(int argc, VALUE *argv, VALUE klass)
|
rb_coverage_start(int argc, VALUE *argv, VALUE klass)
|
||||||
{
|
{
|
||||||
VALUE coverages, opt;
|
VALUE coverages, opt;
|
||||||
int mode, experimental_mode_enabled = 1;
|
int mode;
|
||||||
|
|
||||||
{
|
|
||||||
const char *e = getenv("COVERAGE_EXPERIMENTAL_MODE");
|
|
||||||
if (!e || !*e) experimental_mode_enabled = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!experimental_mode_enabled && argc != 0)
|
|
||||||
rb_error_arity(argc, 0, 0);
|
|
||||||
rb_scan_args(argc, argv, "01", &opt);
|
rb_scan_args(argc, argv, "01", &opt);
|
||||||
|
|
||||||
if (argc == 0) {
|
if (argc == 0) {
|
||||||
|
|
|
@ -184,7 +184,6 @@ class TestCoverage < Test::Unit::TestCase
|
||||||
File.write("test.rb", code)
|
File.write("test.rb", code)
|
||||||
|
|
||||||
assert_in_out_err(%w[-W0 -rcoverage], <<-"end;", stdout, [])
|
assert_in_out_err(%w[-W0 -rcoverage], <<-"end;", stdout, [])
|
||||||
ENV["COVERAGE_EXPERIMENTAL_MODE"] = "true"
|
|
||||||
Coverage.start(#{ opt })
|
Coverage.start(#{ opt })
|
||||||
tmp = Dir.pwd
|
tmp = Dir.pwd
|
||||||
require tmp + '/test.rb'
|
require tmp + '/test.rb'
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
require "coverage"
|
require "coverage"
|
||||||
|
|
||||||
ENV["COVERAGE_EXPERIMENTAL_MODE"] = "true"
|
|
||||||
Coverage.start(lines: true, branches: true, methods: true)
|
Coverage.start(lines: true, branches: true, methods: true)
|
||||||
|
|
||||||
TEST_COVERAGE_DATA_FILE = "test-coverage.dat"
|
TEST_COVERAGE_DATA_FILE = "test-coverage.dat"
|
||||||
|
|
Loading…
Add table
Reference in a new issue