From 9c680981bbc7c3a2456432b0339ffa1fbab01ab9 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 22 Jul 2007 21:41:45 +0000 Subject: Fix binding.c API usage. Modify testcase Makefile to build things other than the XML-based testsuite svn path=/trunk/dom/; revision=3460 --- test/Makefile | 11 ++++++++++- test/binding.c | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'test') 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); -- cgit v1.2.3