1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

fixed xmlSetProp and al. when the node passed is not an element. fixed

* tree.c: fixed xmlSetProp and al. when the node passed is not an
  element.
* relaxng.c: fixed bugs 7.3 (though not complete) and memory leaks
  found 373 test schemas: 369 success 4 failures
  found 529 test instances: 525 success 4 failures
* check-relaxng-test-suite.py: added memory debug reporting
Daniel
This commit is contained in:
Daniel Veillard
2003-02-24 17:17:58 +00:00
parent c64b8e984c
commit 3ebc7d43f7
4 changed files with 145 additions and 196 deletions

View File

@ -7,6 +7,8 @@ import StringIO
sys.path.append("python")
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
debug = 0
#
@ -97,6 +99,7 @@ def handle_valid(node, schema):
nb_instances_failed = nb_instances_failed + 1
else:
nb_instances_success = nb_instances_success + 1
doc.freeDoc()
#
# handle an invalid instance
@ -136,6 +139,7 @@ def handle_invalid(node, schema):
nb_instances_failed = nb_instances_failed + 1
else:
nb_instances_success = nb_instances_success + 1
doc.freeDoc()
#
# handle an incorrect test
@ -364,3 +368,14 @@ print "\nTOTAL:\nfound %d test schemas: %d success %d failures" % (
nb_schemas_tests, nb_schemas_success, nb_schemas_failed)
print "found %d test instances: %d success %d failures" % (
nb_instances_tests, nb_instances_success, nb_instances_failed)
testsuite.freeDoc()
# Memory debug specific
libxml2.relaxNGCleanupTypes()
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()