# another product.
# Tests for SAXophoNit
-module test_saxophonit is test_suite
+module test_saxophonit is test
import sax::helpers::sax_locator_impl
import sax::helpers::attributes_impl
class TestSaxophonit
super SAXTestSuite
+ test
redef fun create_reader do return new XophonReader
- fun test_empty do
+ fun test_empty is test do
before_test
parse_string("<foo />")
expected.document_locator = new SAXLocatorImpl
assert_equals
end
- fun test_simple_element do
+ fun test_simple_element is test do
before_test
parse_string("<foo>bar</foo>")
expected.document_locator = new SAXLocatorImpl
assert_equals
end
- fun test_type_mismatch do
+ fun test_type_mismatch is test do
before_test
parse_string("<a></b>")
expected.document_locator = new SAXLocatorImpl
assert_equals
end
- fun test_attributes do
+ fun test_attributes is test do
var atts = new AttributesImpl
before_test
assert_equals
end
- fun test_nested do
+ fun test_nested is test do
var atts = new AttributesImpl
before_test
assert_equals
end
- fun test_xmldecl do
+ fun test_xmldecl is test do
before_test
parse_string("<?xml version='1.0'?><foo />")
expected.document_locator = new SAXLocatorImpl
assert_equals
end
- fun test_xmldecl_encoding do
+ fun test_xmldecl_encoding is test do
before_test
parse_string("<?xml version=\"1.0\" encoding='utf-8'?><foo />")
expected.document_locator = new SAXLocatorImpl
assert_equals
end
- fun test_xmldecl_standalone do
+ fun test_xmldecl_standalone is test do
before_test
parse_string("<?xml version='1.0' standalone=\"yes\"?><foo />")
expected.document_locator = new SAXLocatorImpl
assert_equals
end
- fun test_xmldecl_both do
+ fun test_xmldecl_both is test do
before_test
parse_string("<?xml version='1.0' encoding='utf-8' standalone=\"yes\"?><foo />")
expected.document_locator = new SAXLocatorImpl
assert_equals
end
- fun test_reference_builtin do
+ fun test_reference_builtin is test do
before_test
parse_string("<foo>&"'<>00:</foo>")
expected.document_locator = new SAXLocatorImpl
assert_equals
end
- fun test_comments do
+ fun test_comments is test do
# TODO For the moment, comments are simply ignored.
before_test
parse_string("<!-- I--><foo>bar<!--l-i-k-e--></foo><!--comments -->")
assert_equals
end
- fun test_ns_simple do
+ fun test_ns_simple is test do
before_test
parse_string("<foo:bar xmlns:foo='https://s.exemple.org' />")
expected.document_locator = new SAXLocatorImpl
assert_equals
end
- fun test_ns_prefix do
+ fun test_ns_prefix is test do
var atts = new AttributesImpl
before_test
assert_equals
end
- fun test_mixed do
+ fun test_mixed is test do
var atts = new AttributesImpl
# TODO For the moment, ignorable white space is not detected.