Sha256: 6926b99acdcc67481acbd8fbc91c5601f81f8b458270391efbed137a42b65e0b

Contents?: true

Size: 646 Bytes

Versions: 12

Compression:

Stored size: 646 Bytes

Contents

require 'spec_helper'

describe Qlang do
  describe 'Vector' do
    context 'into R' do
      it do
        expect(
          Q.to_r.compile('(1 2 3)')
        ).to eq(
          "c(1, 2, 3)"
        )

        expect(
          Q.to_r.compile('(1 2 3 4 5 6)')
        ).to eq(
          "c(1, 2, 3, 4, 5, 6)"
        )

        expect(
          Q.to_r.compile('(1   2    3  4      5   6)')
        ).to eq(
          "c(1, 2, 3, 4, 5, 6)"
        )
      end
    end
    context 'into Ruby' do
      it do
        expect(
          Q.to_ruby.compile('(1 2 3)')
        ).to eq(
          "Vector[1, 2, 3]"
        )
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
qlang-0.0.27180000 spec/objects/vector_spec.rb
qlang-0.0.27100000 spec/objects/vector_spec.rb
qlang-0.0.27000000 spec/objects/vector_spec.rb
qlang-0.0.27 spec/objects/vector_spec.rb
qlang-0.0.14142135 spec/objects/vector_spec.rb
qlang-0.0.1414213 spec/objects/vector_spec.rb
qlang-0.0.141421 spec/objects/vector_spec.rb
qlang-0.0.14142 spec/vector_spec.rb
qlang-0.0.1414 spec/vector_spec.rb
qlang-0.0.141 spec/vector_spec.rb
qlang-0.0.14 spec/vector_spec.rb
qlang-0.0.1 spec/vector_spec.rb