コード例 #1
0
ファイル: main.c プロジェクト: kternovsky/platonix
int main(int argc, char **argv)
{
	test_ins();
	test_has();
	test_del();
	test_seq();
	test_union();
	test_intersection();
	test_diff();
	test_subset();
	puts("Success");
}
コード例 #2
0
ファイル: testart.c プロジェクト: sengupta/scilab_cloud
int
main (int argc, char **argv)
{
    if (argc < 2)
        usage ();

    if (!strcmp (argv[1], "testpat"))
        make_testpat ();
    else if (!strcmp (argv[1], "gradient"))
        test_gradient ();
    else if (!strcmp (argv[1], "dist"))
        test_dist ();
    else if (!strcmp (argv[1], "dash"))
        test_dash ();
    else if (!strcmp (argv[1], "intersect"))
        test_intersect ();
    else if (!strcmp (argv[1], "intersect1"))
        test_intersection();
    else
        usage ();
    return 0;
}
コード例 #3
0
int main()
{
	test_intersection();
	/**
	 * creation of 3 pieces
	 */
	piece test = new_piece_rh(1,2,true,false); 
	piece test2 = new_piece_rh(2,2,false, false);
	piece test3 = new_piece_rh(0,0,true,true);
	display_piece(test);
	display_piece(test2); 
	/** 
	 * display the two first pieces
	 */
	copy_piece(test, test3); 
	/** 
	 * copy_piece is supposed to copy test in test3
	 */
	display_piece(test3); 
	/**
	 * display test3 in order to verify that it's the same as test. - OK 
	 */
	delete_piece(test);
	printf("\nx : %d \ny : %d \nhauteur : %d \nlongueur : %d\n", get_x(test2), get_y(test2), get_height(test2), get_width(test2)); 
	/** 
	 * test of the getters
	 */
	printf("\nhorizontal : %d \n", is_horizontal(test2)); 
	/**
	 * test is_horizontal
	 */
	printf("\nin board : %d \n", is_in_board(test2)); 
	/**
	 * test is_in_board
	 */
	delete_piece(test2);
	delete_piece(test3);
	return EXIT_SUCCESS;
}