Sha256: ce47d0332a1777e761bd52ff80d371e84608689f6290b375beb1b8ee00bdcdba

Contents?: true

Size: 980 Bytes

Versions: 3

Compression:

Stored size: 980 Bytes

Contents

require 'spec_helper'

include Vienna::CherryKit

describe Vienna::CherryKit::RubyBuilder::Iseq do
  
  before(:each) do
    @top = RubyBuilder::Iseq.new(RubyBuilder::ISEQ_TYPE_TOP)
  end
  
  it "should not allow duplicate local names"
  
  it "should not allow duplicate argument names" # should raise error if happens
  
  it "should start local naming from '_a'" do
    @top.push_arg_name("adam").should == "_a"
  end
  
  it "should increment local names from _a through lowercase alphabet" do
    @top.push_arg_name("foo").should == "_a"
    @top.push_arg_name("bar").should == "_b"
    @top.push_arg_name("buz").should == "_c"
  end
  
  it "should loop local names back to _aa after _z" do
    25.times { |i| @top.push_arg_name("___#{i}")  }
    @top.push_arg_name("foo").should == "_z"
    @top.push_arg_name("bar").should == "_aa"
    @top.push_arg_name("buz").should == "_ab"
  end
  
  describe "adam" do
    it "wayy" do
      10.shouldwdwewewwe
    end
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
opal-0.2.2 spec/cherry_kit/iseq_spec.rb
opal-0.2.0 spec/cherry_kit/iseq_spec.rb
opal-0.1.0 spec/cherry_kit/iseq_spec.rb