Sha256: 48a11936e375f549baa47c8296a4292d32a65c5b8c83605777316b81ba979696
Contents?: true
Size: 762 Bytes
Versions: 3
Compression:
Stored size: 762 Bytes
Contents
require 'test_helper' class TestExpressionParser < Test::Unit::TestCase include TestHelper include CodeModels include CodeModels::Js def test_basic_expression_parsing r = Js::ExpressionParser.parse_code("i < 10") assert_equal CodeModels::Js::LANGUAGE,r.language assert_class Js::LessInfixExpression,r end def test_name_expression_parsing r = Js::ExpressionParser.parse_code("pippo") assert_equal CodeModels::Js::LANGUAGE,r.language assert_class Js::Name,r end def test_basic_expression_position r = Js::ExpressionParser.parse_code("i < 10") assert_equal CodeModels::Js::LANGUAGE,r.language assert_equal SourcePoint.new(1,1),r.source.position.begin_point assert_equal SourcePoint.new(1,6),r.source.position.end_point end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
codemodels-js-0.1.1-java | test/test_expression_parser.rb |
codemodels-js-0.1.0-java | test/test_expression_parser.rb |
codemodels-js-0.1.0 | test/test_expression_parser.rb |