Sha256: 19810da02b99ed5b149a0262c3dd8f39557eb479902bd2a1899a79fe177410b3

Contents?: true

Size: 541 Bytes

Versions: 10

Compression:

Stored size: 541 Bytes

Contents

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

class DoWhileTest < Johnson::NodeTestCase
  def test_do_while
    assert_sexp([[:do_while, [:var, [[:assign, [:name, "x"], [:lit, 10]]]], [:true]]],
                @parser.parse('do var x = 10; while(true);'))
    assert_ecma('do var x = 10; while(true);',
                @parser.parse('do var x = 10; while(true);'))
    assert_ecma("do {\n  var x = 10;\n  y = 20;\n} while(true);",
                @parser.parse('do { var x = 10; y = 20; } while(true);'))
  end
end

Version data entries

10 entries across 10 versions & 4 rubygems

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