class MesonJunit::Meson::Test
Single Meson test result.
Attributes
data[R]
Parsed JSON data.
duration[R]
Duration of test run, in seconds.
name[R]
Test
name.
result[R]
Test
result (either :OK or :FAIL).
Public Class Methods
new(data)
click to toggle source
Create a test case from parsed Meson JSON data.
# File lib/meson-junit/meson/test.rb, line 28 def initialize(data) @data = data.freeze @name = @data['name'] @duration = @data['duration'] || 0 @result = @data['result'].intern end
Public Instance Methods
failed?()
click to toggle source
Did this test fail?
# File lib/meson-junit/meson/test.rb, line 45 def failed? @result == :FAIL end
ok?()
click to toggle source
Did this test succeed?
# File lib/meson-junit/meson/test.rb, line 38 def ok? @result == :OK end