Sha256: 25933556fbb252573f62c5a8ea9d514c59acd60666b5bc3ff2b6213e80d32088

Contents?: true

Size: 719 Bytes

Versions: 4

Compression:

Stored size: 719 Bytes

Contents

require 'spec_helper'

describe Archruby::Ruby::VarPropagation do
  it 'storage var propagation correctly' do
    var_propagation = Archruby::Ruby::VarPropagation.new
    var_propagation.push :a, 1, "ClassTeste"
    var_propagation.push :a, 2
    var_propagation.push :a, 3
    var_propagation.vars.first[:a][:lines].count.should be_eql(3)
  end

  it 'put type correctly' do
    var_propagation = Archruby::Ruby::VarPropagation.new
    var_propagation.push :a, 1
    var_propagation.put_type :a, "Teste"
    var_propagation.vars.first[:a][:type].should be_eql("Teste")

    var_propagation.push :b, 1
    var_propagation.put_type :b, "Teste2"
    var_propagation.vars.last[:b][:type].should be_eql("Teste2")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
archruby-0.3.0 spec/ruby/var_propagation_spec.rb
archruby-0.2.0 spec/ruby/var_propagation_spec.rb
archruby-0.1.1 spec/ruby/var_propagation_spec.rb
archruby-0.1.0 spec/ruby/var_propagation_spec.rb