diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2007-07-22 21:41:45 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2007-07-22 21:41:45 +0000 |
commit | 477e602cc22cc1e51e7f6a7f0c59833c1c7b072c (patch) | |
tree | 8ad798085d288dc2864e847fd13efe2b580b7e20 | |
parent | a176515001037f87312dcca7666549ed565632a2 (diff) | |
download | libdom-477e602cc22cc1e51e7f6a7f0c59833c1c7b072c.tar.gz libdom-477e602cc22cc1e51e7f6a7f0c59833c1c7b072c.tar.bz2 |
Fix binding.c API usage.
Modify testcase Makefile to build things other than the XML-based testsuite
svn path=/trunk/dom/; revision=3460
-rw-r--r-- | test/Makefile | 11 | ||||
-rw-r--r-- | test/binding.c | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/test/Makefile b/test/Makefile index 82593de..fd17232 100644 --- a/test/Makefile +++ b/test/Makefile @@ -35,7 +35,9 @@ XMLFILES = $(wildcard xml/tests/*.xml) CFILES = $(addprefix xml/c/, $(notdir $(XMLFILES:.xml=.c))) # Objects -OBJS = $(addprefix xml/bin/, $(notdir $(XMLFILES:.xml=))) +XMLOBJS = $(addprefix xml/bin/, $(notdir $(XMLFILES:.xml=))) +OTHEROBJS = binding +OBJS = $(OTHEROBJS) $(XMLOBJS) .PHONY: clean debug export release setup test @@ -46,6 +48,7 @@ debug: clean: ifneq (${OBJS}, ) + -@${RM} ${RMFLAGS} $(addsuffix ${EXEEXT}, $(OTHEROBJS)) -@${RM} ${RMFLAGS} -r xml/c/ -@${RM} ${RMFLAGS} -r xml/bin/ endif @@ -73,3 +76,9 @@ xml/bin/%: xml/c/%.c xml/c/%.c: xml/tests/%.xml @${XSLT} ${XSLTFLAGS} -o $@ transform/test-to-c.xsl $< + +%: %.c + @${ECHO} ${ECHOFLAGS} "==> $<" + @${CC} -c -g ${CFLAGS} -o $@.o $< + @${LD} -g -o $@ $@.o ${LDFLAGS} -ldom-libxml-debug -ldom-debug + @${RM} ${RMFLAGS} $@.o diff --git a/test/binding.c b/test/binding.c index 803ecaa..8c621ab 100644 --- a/test/binding.c +++ b/test/binding.c @@ -15,7 +15,7 @@ int main(int argc, char **argv) doc = test_object_get_doc(staff); assert(doc != NULL); - err = dom_document_get_element(doc, &element); + err = dom_document_get_document_element(doc, &element); assert(err == DOM_NO_ERR); assert(element != NULL); |