/*****
 NAME
 	cxmlnode-test.m - test program for CXMLNode class
 VERSION
 	$Id$
 CHANGELOG
 	$Log$
 */

#include <coconut/cxmlnode.h>
#include <coconut/fxml.h>

int main()
{
	id <PXMLNode>	node ;
	xmlNodePtr	ptr ;

	printf("*** test program for CXMLNode class\n"); 

	/* allocation test */
	printf("- allocation test\n") ;
	ptr = (xmlNodePtr) extXmlMalloc(sizeof(struct _xmlNode)) ;
	node = xmlNodePtr2Object(ptr) ;
	if([node getNodePtr] == ptr){
		printf("[node getNodePtr] == ptr ... OK\n") ;
	} else {
		printf("[node getNodePtr] != ptr ... BAD\n") ;
		exit(1) ;
	}

	/* dispose test */
	printf("- dispose test\n") ;
	extXmlFree(ptr) ;

	printf("bye\n") ;
	return 0 ;
}

