/*****
 NAME
 	ccmdnum-test.m - test program for CCmdNum class
 VERSION
 	$Id$
 CHANGELOG
	$Log$
 */

#include <coconut/ccmdnum.h>
#include <coconut/cint.h>
#include <coconut/cindtstream.h>

int main()
{
	id <PCmdNum>		cmd ;
	id <PNumber>		num ;
	id <PIndentStream>	stream ;

	printf("***** test program for CCmdNum class\n") ;
	cmd = [[CCmdNum alloc] init] ;
	printf("type : %x\n", (u_int) [cmd type]) ;

	printf("set the number 1234\n") ;
	num = [[CInt alloc] initInt: 1234 format: dec_format] ;
	[cmd setNum: num] ;

	printf("print the above number\n") ;
	stream = [[CIndtStream alloc] init] ;
	[cmd print: stream] ;
	[stream putChar: '\n'] ;
	[stream flush] ;

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

