int main(int argc, char *argv[]) { GLint width, height; EGLint pbuffer_attribute_list[] = { EGL_WIDTH, 256, EGL_HEIGHT, 256, EGL_LARGEST_PBUFFER, EGL_TRUE, EGL_NONE }; const EGLint config_attribute_list[] = { EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_DEPTH_SIZE, 8, EGL_NONE }; const EGLint context_attribute_list[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE }; EGLDisplay display; EGLConfig config; EGLint num_config; EGLContext context; EGLSurface surface; int i; display = get_display(); /* get an appropriate EGL frame buffer configuration */ ECHK(eglChooseConfig(display, config_attribute_list, &config, 1, &num_config)); DEBUG_MSG("num_config: %d", num_config); /* create an EGL rendering context */ ECHK(context = eglCreateContext(display, config, EGL_NO_CONTEXT, context_attribute_list)); ECHK(surface = eglCreatePbufferSurface(display, config, pbuffer_attribute_list)); ECHK(eglQuerySurface(display, surface, EGL_WIDTH, &width)); ECHK(eglQuerySurface(display, surface, EGL_HEIGHT, &height)); DEBUG_MSG("PBuffer: %dx%d", width, height); /* connect the context to the surface */ ECHK(eglMakeCurrent(display, surface, surface, context)); GCHK(glFlush()); for (i = 0; ; i++) { if (test_compiler(i)) { break; } } ECHK(eglDestroySurface(display, surface)); ECHK(eglTerminate(display)); }
int main() { int Error = 0; Error += test_compiler(); Error += test_model(); Error += test_operators(); return Error; }
int main (int argc, const char * argv[]) { execute_test(&test_add); execute_test(&test_addi); execute_test(&test_div); execute_test(&test_lui); execute_test(&test_lw); execute_test(&test_mult); execute_test(&test_ori); execute_test(&test_sub); execute_test(&initialize); execute_test(&test_sw); execute_test(&test_printf_memory_write); test_compiler("1+1", (1+1)); test_compiler("(3*(45+6))+12", ((3*(45+6))+12)); test_compiler("5*( 4-3) /(7- 5* (8+3/2))", (5*(4-3)/(7-5*(8+3/2)))); printf("A little bird told me to add this so I know if it really passed ;-)\n"); /*execute_test(&test_error);*/ return 0; }
int main() { //Class<vec, float> C; int Error = 0; Error += test_cpp_version(); Error += test_compiler(); Error += test_model(); Error += test_operators(); return Error; }
void VSFMergeTest::run(OsFile_Handle config_file) { SETUP_ERROR_CHECKER_ARG; AccessFlags access_flags; access_flags.set_flags(0); Method method = Universe::new_method(0, access_flags JVM_CHECK); method.set_max_locals(MAX_TEST_LOCATION_COUNT); Compiler test_compiler(&method, -1); GUARANTEE(Compiler::current() != NULL, "Sanity"); Compiler * const compiler = Compiler::current(); CompiledMethod compiled_method = Universe::new_compiled_method(MAX_VSF_MERGE_CODE_SIZE JVM_NO_CHECK); compiler->set_current_compiled_method(&compiled_method); CodeGenerator code_generator(compiler); execute_test_cases(config_file JVM_NO_CHECK_AT_BOTTOM); }
void test_all() { io::test_all(); test_vm_stack(); test_shunting_yard(); test_compiler(); }