Sha256: ed834b80b4dc86a1428321cd76a0b311777f09494448e7bd7484be353b8a83d6

Contents?: true

Size: 573 Bytes

Versions: 32

Compression:

Stored size: 573 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe Gecode::LoggingLayer do
  before do
    # Enable logging.
    Gecode.instance_eval{ remove_const(:Raw) }
    Gecode.const_set(:Raw, Gecode::LoggingLayer)
  end
  
  after do
    # Disable logging.
    Gecode.instance_eval{ remove_const(:Raw) }
    Gecode.const_set(:Raw, GecodeRaw)
  end

  it "shouldn't interfere with calls through Gecode::Raw" do
    lambda do
      model = Gecode::Model.new
      int_var = model.int_var(0..9)
      int_var.must >= 5
      model.solve!
    end.should_not raise_error
  end
end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
gecoder-with-gecode-1.1.1.1 specs/logging.rb
gecoder-with-gecode-1.1.1 specs/logging.rb
gecoder-1.1.1 specs/logging.rb
gecoder-with-gecode-1.1.0 specs/logging.rb
gecoder-1.1.0 specs/logging.rb
gecoder-with-gecode-0.8.3-mswin32 specs/logging.rb
gecoder-with-gecode-0.8.2-mswin32 specs/logging.rb
gecoder-with-gecode-0.8.1-mswin32 specs/logging.rb
gecoder-with-gecode-0.8.0-mswin32 specs/logging.rb
gecoder-with-gecode-0.7.1-mswin32 specs/logging.rb
gecoder-0.6.0 specs/logging.rb
gecoder-0.6.1 specs/logging.rb
gecoder-0.7.0 specs/logging.rb
gecoder-0.7.1 specs/logging.rb
gecoder-0.8.0 specs/logging.rb
gecoder-0.8.1 specs/logging.rb
gecoder-0.8.2 specs/logging.rb
gecoder-0.8.3 specs/logging.rb
gecoder-1.0.0 specs/logging.rb
gecoder-0.9.0 specs/logging.rb