summaryrefslogtreecommitdiff
path: root/gentest.py
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2004-11-05 14:30:41 +0000
committerDaniel Veillard <veillard@src.gnome.org>2004-11-05 14:30:41 +0000
commit0ea9c9fd916136fbb772fc40ab14ed5692342e8d (patch)
tree802b3d3cc19500eaab74bd54fa917d671b185d3a /gentest.py
parent8e725fb4de3cf29de03694e4e34649ec52f15600 (diff)
downloadlibxml2-0ea9c9fd916136fbb772fc40ab14ed5692342e8d.tar.gz
more coverage one fix Daniel
* gentest.py testapi.c: more coverage * xmlunicode.c: one fix Daniel
Diffstat (limited to 'gentest.py')
-rwxr-xr-xgentest.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/gentest.py b/gentest.py
index 7f97fa9d..bc8aa308 100755
--- a/gentest.py
+++ b/gentest.py
@@ -15,7 +15,7 @@ except:
# Modules we don't want skip in API test
#
skipped_modules = [ "SAX", "SAX2", "xlink", "threads", "globals",
- "xpathInternals", "xmlunicode", "parserInternals", "xmlmemory",
+ "xpathInternals", "parserInternals", "xmlmemory",
"xmlversion", "debugXML", "xmlexports", "DOCBparser",
# temporary
@@ -146,7 +146,11 @@ def add_missing_type(name, func):
missing_types[name] = [func]
missing_functions = {}
+missing_functions_nr = 0
def add_missing_functions(name, module):
+ global missing_functions_nr
+
+ missing_functions_nr = missing_functions_nr + 1
try:
list = missing_functions[module]
list.append(name)
@@ -361,13 +365,6 @@ def generate_test(module, node):
if is_skipped_function(name):
return
- test.write("""
-static int
-test_%s(void) {
- int ret = 0;
-
-""" % (name))
-
#
# check we know how to handle the args and return values
# and store the informations for the generation
@@ -408,6 +405,13 @@ test_%s(void) {
t_ret = (type, rtype, info)
break
+ test.write("""
+static int
+test_%s(void) {
+ int ret = 0;
+
+""" % (name))
+
if no_gen == 1:
add_missing_functions(name, module)
test.write("""
@@ -606,7 +610,7 @@ def compare_missing(a, b):
return b[0] - a[0]
missing_list.sort(compare_missing)
-print "Missing support for %d types see missing.lst" % (len(missing_list))
+print "Missing support for %d functions and %d types see missing.lst" % (missing_functions_nr, len(missing_list))
lst = open("missing.lst", "w")
lst.write("Missing support for %d types" % (len(missing_list)))
lst.write("\n")