Commit Graph

8 Commits

Author SHA1 Message Date
sergei
7cc9e5c18c * Provide distinct error messages.
git-svn-id: trunk@27121 -
2014-03-13 00:28:33 +00:00
sergei
134e5167f1 * fcl-xml testing suite, working around excessive string conversions by using new method assertEqualsW to compare wide strings. Since TTestCase.assertEquals method already exists with ansistring arguments, and its first argument is a literal in most cases, overloading does not help here.
git-svn-id: trunk@20442 -
2012-02-29 09:28:03 +00:00
sergei
d2c3ab0730 * r13729 was broken due to missing typecast, shame on me. Fixed.
git-svn-id: trunk@13787 -
2009-10-01 19:11:47 +00:00
sergei
fc34dc84ff domunit.pp:
+ Added TDOMTestBase.LoadStringData method, allows loading documents from string.
* Don't return empty string from GetResourceURI when file doesn't exist. Thus we can see the problematic filename in the test output.

+ Added extras.pp, contains a few tests not present in w3.org test suite.
+ Added extras2.pp, contains some tests ported by hand because no automatic conversion possible yet. It addresses namespace fixup during serialization and canonical-form issues.

README_DOM.txt: updated to reflect the added units.

git-svn-id: trunk@13729 -
2009-09-17 09:58:15 +00:00
sergei
54b475a68b dom.pp:
* Partial fix for #13605 (fixes the issue as reported, but a fix for nodelists returned by
  GetElementsByTagName[NS] is also needed):
  - Each node which can have children has an associated instance of TDOMNodeList;
  - Other nodes are substituted by special 'null' node, having an empty child list;
  - Muiltiple calls to ChildNodes return the same instance of TDOMNodeList;
  - Calling Free on result of ChildNodes is optional; if not freed, it will be destroyed with
    the owning node.

tests/domunit.pp:
* Changed TFPObjectList to TObjectList, which has been found to destroy its elements in opposite
 order (reported as #13715). As NodeLists became owned by Document, old (FIFO) destruction order is
 causing their double destruction.

git-svn-id: trunk@13143 -
2009-05-14 21:00:29 +00:00
sergei
efcccbf895 Test suite improvements, targeted to support the HTML suite:
domunit.pp:
+ Added AssertEqualsNoCase() method.
* TDOMTestBase.Load chaned doc argument to untyped, because some tests use TDOMNode instead of a
  TDOMDocument.
* Completed the URIEquals() method; changed parameter types to PChar in order to be able to
  distinguish nil from empty string.
* Modified GetResourceURI method so it is capable to handle the directory structure of CVS
  snapshot (level2/html using data files from level1/html).

testgen.pp:
* Counterparts to changes in domunit.pp
+ Support for renaming APIs (e.g. 'type'->'htmlType')
+ Support for enforcing the correct type of function arguments (emits 'as' operator).

api.xml:
+ Added data for DOM Level3 XPath and Level2 HTML suites.

git-svn-id: trunk@13055 -
2009-04-28 19:18:07 +00:00
michael
67f56b7adf * Patch from Sergei Gorelkin:
src/xmlread.pp, src/dom.pp
  * Improvements to attribute processing: attributes are now validated as
    they come. This enables reporting of the corresponding validation
    errors at correct positions (previously everything was reported at the
    end of element start-tag).
  * Search for a declaration for attribute, not for an attribute
    corresponding to the declaration. This reduces number of lookups
    (because unspecified attributes are not searched) and obsoletes the
    need in FDeclared field on every attribute.

  tests/domunit.pp, tests/testgen.pp:

  * Various improvements required to support converting of the
    DOM level 3 XPath module.

git-svn-id: trunk@12026 -
2008-11-04 18:33:05 +00:00
michael
b3d983ce07 * Initial testsuite from Sergei Gorelkin
* testgen.pp - an utility to convert w3.org tests from XML format
      into fpcunit-compatible Pascal source. The official testsuite uses
      xslt for conversion, but, since there is no xslt for Pascal, and no
      xslt support in FCL yet, I wrote an utility.
    * api.xml    - API 'database', needed by testgen.
    * domunit.pp - an fpcunit extension, provides DOM-specific runtime
      support.
    * README_DOM - provides some instructions about putting it all together.

git-svn-id: trunk@11390 -
2008-07-17 14:57:31 +00:00