Sha256: a15ff680bcef23f07fe1d495822cc25c0a115f650fd55e973b1984d1ee893ff6

Contents?: true

Size: 452 Bytes

Versions: 65

Compression:

Stored size: 452 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

RSpec.describe Code::Object::Boolean do
  [
    ["true & false", "false"],
    %w[true.bitwise_and(false) false],
    ["true | false", "true"],
    %w[true.bitwise_or(false) true],
    ["true ^ false", "true"],
    %w[true.bitwise_xor(false) true]
  ].each do |input, expected|
    it "#{input} == #{expected}" do
      expect(Code.evaluate(input)).to eq(Code.evaluate(expected))
    end
  end
end

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
code-ruby-0.14.9 spec/code/object/boolean_spec.rb
code-ruby-0.14.8 spec/code/object/boolean_spec.rb
code-ruby-0.14.6 spec/code/object/boolean_spec.rb
code-ruby-0.14.5 spec/code/object/boolean_spec.rb
code-ruby-0.14.4 spec/code/object/boolean_spec.rb
code-ruby-0.14.3 spec/code/object/boolean_spec.rb
code-ruby-0.14.2 spec/code/object/boolean_spec.rb
code-ruby-0.14.1 spec/code/object/boolean_spec.rb
code-ruby-0.14.0 spec/code/object/boolean_spec.rb
code-ruby-0.13.1 spec/code/object/boolean_spec.rb
code-ruby-0.13.0 spec/code/object/boolean_spec.rb
code-ruby-0.12.0 spec/code/object/boolean_spec.rb
code-ruby-0.11.0 spec/code/object/boolean_spec.rb
code-ruby-0.10.4 spec/code/object/boolean_spec.rb
code-ruby-0.10.3 spec/code/object/boolean_spec.rb
code-ruby-0.10.2 spec/code/object/boolean_spec.rb
code-ruby-0.10.1 spec/code/object/boolean_spec.rb
code-ruby-0.10.0 spec/code/object/boolean_spec.rb
code-ruby-0.9.3 spec/code/object/boolean_spec.rb
code-ruby-0.9.2 spec/code/object/boolean_spec.rb