Ejemplo n.º 1
0
/**
 * Top level function for coord testing.
 */
void coord() {
	phys2_0();
	phys2_delta_0();
	tile_0();
	tile_delta_0();
	tile_and_phys2_0();
	chunk_0();
	phys3_0();
	phys3_delta_0();
	tile3_0();
	camgame_0();
	camgame_delta_0();
	camhud_0();
	camhud_delta_0();
	term_0();
}
Ejemplo n.º 2
0
/**
 * Top level function for coord testing.
 */
void coord() {
	int ret;
	const char *testname;
	
	if ((ret = phys2_0()) != -1) {
		testname = "phys2 test";
		goto out;
	}
	
	if ((ret = phys2_delta_0()) != -1) {
		testname = "phys2_delta test";
		goto out;
	}
	
	if ((ret = tile_0()) != -1) {
		testname = "tile test";
		goto out;
	}
	
	if ((ret = tile_delta_0()) != -1) {
		testname = "tile_delta test";
		goto out;
	}

	if ((ret = tile_and_phys2_0()) != -1) {
		testname = "tile and phys2 test";
		goto out;
	}
	
	if ((ret = chunk_0()) != -1) {
		testname = "chunk test";
		goto out;
	}

	if ((ret = phys3_0()) != -1) {
		testname = "phys3 test";
		goto out;
	}
	
	if ((ret = phys3_delta_0()) != -1) {
		testname = "phys3 delta test";
		goto out;
	}

	if ((ret = tile3_0()) != -1) {
		testname = "tile3 test";
		goto out;
	}

	if ((ret = camgame_0()) != -1) {
		testname = "camgame test";
		goto out;
	}

	if ((ret = camgame_delta_0()) != -1) {
		testname = "camgame delta test";
		goto out;
	}

	if ((ret = camhud_0()) != -1) {
		testname = "camhud test";
		goto out;
	}

	if ((ret = camhud_delta_0()) != -1) {
		testname = "camhud delta test";
		goto out;
	}

	if ((ret = term_0()) != -1) {
		testname = "term test";
		goto out;
	}

	log::log(MSG(info) << "Coord test passed");
	return;

out:
	log::log(MSG(err) << testname << " failed at stage " << ret);
	throw "failed coord tests";
}