Sha256: cc3171dd8b6ef1918afd62a27b2da51003cf7216988f2f5b40dd01be5dbde11e

Contents?: true

Size: 636 Bytes

Versions: 11

Compression:

Stored size: 636 Bytes

Contents

require 'spec_helper'

describe "StructCompare" do
  it "compares correctly" do
    p = File.expand_path('../../fixtures/misc', __FILE__)
    fname = "%s/%s" % [p, 'struct_compare_tests.txt']
    aggregate_failures 'struct_compare' do
      data = JSON.parse(File.read(fname))
      data.each do |ex|
        args = [ex["v1"], ex["v2"], ex['cmp_opts']].compact
        comp = struct_compare(*args)
        comparison = comp.nil? ? false : comp
        num = ex["example_number"]
        binding.pry if comparison != ex['res']
        expect(comparison).to eq(ex["res"]), "Test ##{num} failed: #{comparison}"
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
marty-2.5.2 spec/lib/struct_compare_spec.rb
marty-2.5.1 spec/lib/struct_compare_spec.rb
marty-2.5.0 spec/lib/struct_compare_spec.rb
marty-2.4.9 spec/lib/struct_compare_spec.rb
marty-2.4.8 spec/lib/struct_compare_spec.rb
marty-2.4.7 spec/lib/struct_compare_spec.rb
marty-2.4.6 spec/lib/struct_compare_spec.rb
marty-2.4.5 spec/lib/struct_compare_spec.rb
marty-2.4.4 spec/lib/struct_compare_spec.rb
marty-2.4.3 spec/lib/struct_compare_spec.rb
marty-2.4.2 spec/lib/struct_compare_spec.rb