Sha256: 681856acd60ee23b7ba363d6b1b97be57fad0d01a3814e4e8a95136b4d7b4496

Contents?: true

Size: 303 Bytes

Versions: 10

Compression:

Stored size: 303 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), "helper"))

class EnumeratingVisitorTest < Test::Unit::TestCase
  def test_for
    ast = Johnson.parse('for(var x = 0; x < 10; x++) { }')
    counter = 0
    ast.each do |node|
      counter += 1
    end
    assert_equal(12, counter)
  end
end

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
johnson19-2.0.0.pre3 test/johnson/generic/visitors/enumerating_visitor_test.rb
pre-johnson-2.0.0 test/johnson/generic/visitors/enumerating_visitor_test.rb
johnson-2.0.0.pre3 test/johnson/generic/visitors/enumerating_visitor_test.rb
johnson-2.0.0.pre2 test/johnson/generic/visitors/enumerating_visitor_test.rb
johnson-2.0.0.pre1 test/johnson/generic/visitors/enumerating_visitor_test.rb
johnson-2.0.0.pre0 test/johnson/generic/visitors/enumerating_visitor_test.rb
smparkes-johnson-1.1.2.6 test/johnson/generic/visitors/enumerating_visitor_test.rb
smparkes-johnson-1.1.2.5 test/johnson/generic/visitors/enumerating_visitor_test.rb
smparkes-johnson-1.1.2.4 test/johnson/generic/visitors/enumerating_visitor_test.rb
smparkes-johnson-1.1.2.3 test/johnson/generic/visitors/enumerating_visitor_test.rb