Class: Bparity::Formal::DifferentialRunner
- Inherits:
-
Object
- Object
- Bparity::Formal::DifferentialRunner
- Defined in:
- lib/bparity/formal/bounded.rb
Instance Method Summary collapse
-
#initialize(old_command:, new_command:, inputs:) ⇒ DifferentialRunner
constructor
A new instance of DifferentialRunner.
- #run ⇒ Object
Constructor Details
#initialize(old_command:, new_command:, inputs:) ⇒ DifferentialRunner
Returns a new instance of DifferentialRunner.
508 509 510 511 512 |
# File 'lib/bparity/formal/bounded.rb', line 508 def initialize(old_command:, new_command:, inputs:) @old_command = old_command @new_command = new_command @inputs = inputs end |
Instance Method Details
#run ⇒ Object
514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/bparity/formal/bounded.rb', line 514 def run @inputs.filter_map do |input| expected = observe(@old_command, input) actual = observe(@new_command, input) differences = Verification::Differ.call(expected, actual) unless differences.empty? { "input" => input, "expected" => expected, "actual" => actual, "differences" => differences } end end end |