Ignore:
Timestamp:
Apr 28, 2008, 7:34:20 AM (16 years ago)
Author:
Tatsukawa, Akimichi
Message:

parsing c_any fails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/trunk/adl_parser/tests/scanner_test.rb

    r17 r18  
    1212    parser = OpenEHR::ADL::Scanner::DADL::V_LOCAL_TERM_CODE_REF.new
    1313    assert_instance_of OpenEHR::ADL::Scanner::DADL::V_LOCAL_TERM_CODE_REF,parser
    14     result = parser.parse('')
     14    result = parser.parse('[en-us]')
     15    assert_instance_of Yaparc::Result::OK, result
     16  end
     17
     18  def test_V_QUALIFIED_TERM_CODE_REF
     19    parser = OpenEHR::ADL::Scanner::DADL::V_QUALIFIED_TERM_CODE_REF.new
     20    assert_instance_of OpenEHR::ADL::Scanner::DADL::V_QUALIFIED_TERM_CODE_REF,parser
     21    result = parser.parse('[ISO_639::en]')
     22    assert_instance_of Yaparc::Result::OK, result
     23    result = parser.parse('[ISO_639::en-us]')
     24    assert_instance_of Yaparc::Result::OK, result
     25  end
     26
     27  def test_V_STRING
     28    parser = OpenEHR::ADL::Scanner::DADL::V_STRING.new
     29    assert_instance_of OpenEHR::ADL::Scanner::DADL::V_STRING,parser
     30    result = parser.parse('"this is a string"')
     31    assert_instance_of Yaparc::Result::OK, result
     32    result = parser.parse('"en-us"')
     33    assert_instance_of Yaparc::Result::OK, result
     34  end
     35
     36  def test_V_REAL
     37    parser = OpenEHR::ADL::Scanner::DADL::V_REAL.new
     38    assert_instance_of OpenEHR::ADL::Scanner::DADL::V_REAL,parser
     39    result = parser.parse('0.1')
     40    assert_instance_of Yaparc::Result::OK, result
     41    result = parser.parse('0.0..20000.0')
     42    assert_instance_of Yaparc::Result::OK, result
     43    assert_equal [:V_REAL, "0.0"], result.value
     44    assert_equal "..20000.0", result.input
     45
    1546  end
    1647end
Note: See TracChangeset for help on using the changeset viewer.