rcov 0.9.7.1 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/bin/rcov +3 -0
- data/ext/rcovrt/1.8/rcovrt.c +9 -2
- data/lib/rcov/version.rb +2 -2
- data/test/code_coverage_analyzer_test.rb +0 -2
- metadata +1 -1
data/Rakefile
CHANGED
@@ -55,7 +55,7 @@ if RUBY_PLATFORM == 'java'
|
|
55
55
|
sh "jar cf #{t.name} -C pkg/classes ."
|
56
56
|
end
|
57
57
|
else
|
58
|
-
|
58
|
+
Rake::TestTask.new(:test_rcovrt => ["ext/rcovrt/rcovrt.so"]) do |t|
|
59
59
|
system("cd ext/rcovrt && make clean && rm Makefile")
|
60
60
|
t.libs << "ext/rcovrt"
|
61
61
|
t.test_files = FileList['test/*_test.rb']
|
data/bin/rcov
CHANGED
@@ -498,6 +498,9 @@ $rcov_code_coverage_analyzer.install_hook
|
|
498
498
|
|
499
499
|
#{{{ Load scripts
|
500
500
|
begin
|
501
|
+
if RUBY_VERSION =~ /1.9/
|
502
|
+
puts "** WARNING: Ruby 1.9 Support is experimental at best. Don't expect correct results! **"
|
503
|
+
end
|
501
504
|
pending_scripts = ARGV.clone
|
502
505
|
ARGV.replace extra_args
|
503
506
|
until pending_scripts.empty?
|
data/ext/rcovrt/1.8/rcovrt.c
CHANGED
@@ -51,8 +51,15 @@ static struct cov_array * coverage_increase_counter_uncached(char *sourcefile, u
|
|
51
51
|
}
|
52
52
|
|
53
53
|
if(mark_only) {
|
54
|
-
if(
|
55
|
-
carray->ptr[sourceline]
|
54
|
+
if (carray && carray->len > sourceline) {
|
55
|
+
if(!carray->ptr[sourceline])
|
56
|
+
carray->ptr[sourceline] = 1;
|
57
|
+
} else {
|
58
|
+
#if COVERAGE_DEBUG_EVENTS
|
59
|
+
printf("DEBUG: %s carray->len:%d sourceline:%d\n",
|
60
|
+
sourcefile, carray->len, sourceline);
|
61
|
+
#endif
|
62
|
+
}
|
56
63
|
} else {
|
57
64
|
if (carray && carray->len > sourceline) {
|
58
65
|
carray->ptr[sourceline]++;
|
data/lib/rcov/version.rb
CHANGED
@@ -48,8 +48,6 @@ EOF
|
|
48
48
|
assert_equal(lines, line_info)
|
49
49
|
assert_equal([true, true, false, false, true, false, true], cov_info)
|
50
50
|
assert_equal([1, 2, 0, 0, 1, 0, 11], count_info) unless RUBY_PLATFORM =~ /java/
|
51
|
-
# JRUBY reports an if x==blah as hitting this type of line once, JRUBY also optimizes this stuff so you'd have to run with --debug to get "extra" information. MRI hits it twice.
|
52
|
-
assert_equal([1, 3, 0, 0, 1, 0, 33], count_info) if RUBY_PLATFORM =~ /java/
|
53
51
|
analyzer.reset
|
54
52
|
assert_equal(nil, analyzer.data(sample_file))
|
55
53
|
assert_equal([], analyzer.analyzed_files)
|