示例#1
0
static TEE_Result invoke_command(void *pSessionContext, uint32_t nCommandID,
				uint32_t nParamTypes, TEE_Param pParams[4])
{
	DMSG("command entry point for static ta \"%s\"", TA_NAME);

	switch (nCommandID) {
	case CMD_TRACE:
		return test_trace(nParamTypes, pParams);
	case CMD_PARAMS:
		return test_entry_params(nParamTypes, pParams);
	case CMD_DIRTY_TESTS:
		return core_dirty_tests(nParamTypes, pParams);
	default:
		break;
	}
	return TEE_ERROR_BAD_PARAMETERS;
}
示例#2
0
/*
	Tests Definitions
*/
void TestGridRayTrace(std::ostream& output)
{
	tf::Vector3 start(1.0, 1.0, 0.0);
	tf::Vector3 end(10.0, 10.0, 0.0);
	
	output << start.getX() << "," << start.getY();
	output << " -> ";
	output << end.getX() << "," << end.getY();
	output << "\n";
	
	OccupancyGrid test_grid(0, 0, 2.0, 0.0, 0.0);
	
	int i, j;
	GridRayTrace test_trace(start, end, test_grid);
	while(test_trace.getNextPoint(i, j))
		output << i << ", " << j << "\n";
}
示例#3
0
void test_trace(int argc, char **argv) {
    test_argc = argc;
    test_argv = argv;

    test_common_init();

    pthread_t p;
    pthread_create(&p, NULL, (void *)&test_thread, (void *)NULL);

    while (!test_thread_running) {
        struct timespec ts = { .tv_sec=0, .tv_nsec=33333333 };
        nanosleep(&ts, NULL);
    }
    emulator_start();
    //pthread_join(p, NULL);
}

#if !defined(__APPLE__) && !defined(ANDROID)
int main(int argc, char **argv) {
    test_trace(argc, argv);
}
示例#4
0
int main(int argc, char** argv)
{
    if (argc != 2) {
        usage(argv);
        return 1;
    }

    mem_mgmt_t * mem;
    int test_number = atoi(argv[1]);
    switch (test_number) {
        case 0:
            mem = new fixed_lists_mem_t();
            test(mem);
            break;
        case 1:
            mem = new fixed_lists_mem_t();
            test_trace(mem);
            break;
        default:
            usage(argv);
            return 1;
    }
}