We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e95271 commit 7e8b4acCopy full SHA for 7e8b4ac
lib/truffle/coverage.rb
@@ -11,13 +11,23 @@
11
12
module Coverage
13
14
- def self.start
+ def self.supported?(mode)
15
+ mode == :lines
16
+ end
17
+
18
+ def self.start(*arguments, **options)
19
+ # We have to track if the :lines option was provided, as that calls for a
20
+ # different result format
21
+ @lines = true if options[:lines]
22
Truffle::Coverage.enable
23
end
24
25
def self.result
26
result = peek_result
27
Truffle::Coverage.disable
28
+ # We have to wrap the coverage lines array in a hash with the :lines key if
29
+ # the :lines option was given
30
+ result.transform_values! { |_,lines_array| {lines: lines_array} } if @lines
31
result
32
33
0 commit comments