Sha256: 61bacffb84d60ff7d4b5b7930c0f2b5488f8c216f99f2d928d478b84c67977a4

Contents?: true

Size: 636 Bytes

Versions: 51

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

51 entries across 51 versions & 1 rubygems

Version Path
marty-14.3.0 spec/lib/struct_compare_spec.rb
marty-14.0.0 spec/lib/struct_compare_spec.rb
marty-13.0.2 spec/lib/struct_compare_spec.rb
marty-11.0.0 spec/lib/struct_compare_spec.rb
marty-10.0.3 spec/lib/struct_compare_spec.rb
marty-10.0.2 spec/lib/struct_compare_spec.rb
marty-10.0.0 spec/lib/struct_compare_spec.rb
marty-9.5.1 spec/lib/struct_compare_spec.rb
marty-9.5.0 spec/lib/struct_compare_spec.rb
marty-9.3.3 spec/lib/struct_compare_spec.rb
marty-9.3.2 spec/lib/struct_compare_spec.rb
marty-9.3.0 spec/lib/struct_compare_spec.rb
marty-8.5.0 spec/lib/struct_compare_spec.rb
marty-8.4.1 spec/lib/struct_compare_spec.rb
marty-8.3.1 spec/lib/struct_compare_spec.rb
marty-8.2.0 spec/lib/struct_compare_spec.rb
marty-8.0.0 spec/lib/struct_compare_spec.rb
marty-6.1.0 spec/lib/struct_compare_spec.rb
marty-5.2.0 spec/lib/struct_compare_spec.rb
marty-5.1.4 spec/lib/struct_compare_spec.rb