Author: jmb
Date: Sun Jul 22 22:41:45 2007
New Revision: 3460
URL:
http://source.netsurf-browser.org?rev=3460&view=rev
Log:
Fix binding.c API usage.
Modify testcase Makefile to build things other than the XML-based testsuite
Modified:
trunk/dom/test/Makefile
trunk/dom/test/binding.c
Modified: trunk/dom/test/Makefile
URL:
http://source.netsurf-browser.org/trunk/dom/test/Makefile?rev=3460&r1...
==============================================================================
--- trunk/dom/test/Makefile (original)
+++ trunk/dom/test/Makefile Sun Jul 22 22:41:45 2007
@@ -35,7 +35,9 @@
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 @@
clean:
ifneq (${OBJS}, )
+ -@${RM} ${RMFLAGS} $(addsuffix ${EXEEXT}, $(OTHEROBJS))
-@${RM} ${RMFLAGS} -r xml/c/
-@${RM} ${RMFLAGS} -r xml/bin/
endif
@@ -73,3 +76,9 @@
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
Modified: trunk/dom/test/binding.c
URL:
http://source.netsurf-browser.org/trunk/dom/test/binding.c?rev=3460&r...
==============================================================================
--- trunk/dom/test/binding.c (original)
+++ trunk/dom/test/binding.c Sun Jul 22 22:41:45 2007
@@ -15,7 +15,7 @@
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);