static int test_boot(void) { if (BitVector_Boot() != ErrCode_Ok) return 1; return 0; }
int main(void) { int nf = 0; if (BitVector_Boot() != ErrCode_Ok) return EXIT_FAILURE; yasm_floatnum_initialize(); failed[0] = '\0'; printf("Test floatnum_test: "); nf += runtest(new_normalized, NULL, NULL); nf += runtest(new_normalized_edgecase, NULL, NULL); nf += runtest(get_single_normalized, get_family_setup, get_family_teardown); nf += runtest(get_single_normalized_edgecase, get_family_setup, get_family_teardown); nf += runtest(get_double_normalized, get_family_setup, get_family_teardown); nf += runtest(get_double_normalized_edgecase, get_family_setup, get_family_teardown); nf += runtest(get_extended_normalized, get_family_setup, get_family_teardown); nf += runtest(get_extended_normalized_edgecase, get_family_setup, get_family_teardown); printf(" +%d-%d/8 %d%%\n%s", 8-nf, nf, 100*(8-nf)/8, failed); return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
int main(void) { int nf = 0; int numtests = sizeof(tests)/sizeof(Test_Entry); int i; if (BitVector_Boot() != ErrCode_Ok) return EXIT_FAILURE; yasm_intnum_initialize(); failed[0] = '\0'; printf("Test leb128_test: "); for (i=0; i<numtests; i++) { int fail; fail = run_output_test(&tests[i]); printf("%c", fail>0 ? 'F':'.'); fflush(stdout); if (fail) sprintf(failed, "%s ** F: %s\n", failed, failmsg); nf += fail; fail = run_input_test(&tests[i]); printf("%c", fail>0 ? 'F':'.'); fflush(stdout); if (fail) sprintf(failed, "%s ** F: %s\n", failed, failmsg); nf += fail; } yasm_intnum_cleanup(); printf(" +%d-%d/%d %d%%\n%s", numtests*2-nf, nf, numtests*2, 100*(numtests*2-nf)/(numtests*2), failed); return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }
static void num_family_setup(void) { BitVector_Boot(); testval = BitVector_Create(80, FALSE); }