Sha256: 38185fba7adb4b37a00c8caf8c0e3749261accadf98ed93b0deb92f0e899e7b2

Contents?: true

Size: 775 Bytes

Versions: 6

Compression:

Stored size: 775 Bytes

Contents

require 'spec_helper'

describe Qlang do
  describe 'List' do
    it do
      expect(
        Q.to_r.compile('{name: "Gogotanaka", age:  21, birth: (1992 8 10) }')
      ).to eq(
        "list(name=\"Gogotanaka\", age=21, birth=c(1992, 8, 10))"
      )

      expect(
        Q.to_r.compile('{key1: 234234, key2: 387342 }')
      ).to eq(
        "list(key1=234234, key2=387342)"
      )

      expect(
        Q.to_r.compile('{key1:234234,key2:387342,key3:38733242}')
      ).to eq(
        "list(key1=234234, key2=387342, key3=38733242)"
      )

      expect(
        Q.to_r.compile('{key1:(1 3 2; 8 2 3),key2:387342,key3:38733242}')
      ).to eq(
        "list(key1=matrix(c(1, 3, 2, 8, 2, 3), 2, 3, byrow = TRUE), key2=387342, key3=38733242)"
      )
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
qlang-0.0.14142135 spec/objects/list_spec.rb
qlang-0.0.1414213 spec/objects/list_spec.rb
qlang-0.0.141421 spec/objects/list_spec.rb
qlang-0.0.14142 spec/list_spec.rb
qlang-0.0.1414 spec/list_spec.rb
qlang-0.0.141 spec/list_spec.rb