Sha256: c546e7e53e670834a6c13e028cd3d17713fd5b3790b1a103334d704b31e01983

Contents?: true

Size: 304 Bytes

Versions: 5

Compression:

Stored size: 304 Bytes

Contents

require 'spec_helper'

describe "Class variables" do
  it "should always be returned as s(:cvar)" do
    opal_parse("@@foo").should == [:cvar, :@@foo]
  end

  it "should always be converted to s(:cvdecl) on assignment" do
    opal_parse("@@foo = 100").should == [:cvdecl, :@@foo, [:int, 100]]
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
opal-0.5.5 spec/opal/parser/cvar_spec.rb
opal-0.5.4 spec/opal/parser/cvar_spec.rb
opal-0.5.2 spec/opal/parser/cvar_spec.rb
opal-0.5.0 spec/opal/parser/cvar_spec.rb
opal-0.4.4 spec/parser/cvar_spec.rb