tests
This commit is contained in:
50
nwtests.c
50
nwtests.c
@@ -1606,6 +1606,53 @@ static int tests_c32scanfirst(void)
|
||||
}
|
||||
|
||||
|
||||
static int tests_c32scanrefs2(void)
|
||||
{
|
||||
uint8 out[40];
|
||||
uint16 load_ax, res_off, res_seg, tramp_off, tramp_seg;
|
||||
uint16 fn_off, fn_seg, ret_ax, ret_dx;
|
||||
uint16 cref_lo, cref_hi, rinfo_lo, rinfo_hi, iter_lo, iter_hi;
|
||||
|
||||
memset(out, 0, sizeof(out));
|
||||
|
||||
fprintf(stdout, "TEST C32SCANREFS2\n");
|
||||
fprintf(stdout, "CONNScanInfo exact-shape probe, return NWCC_INFO_CONN_REF\n");
|
||||
|
||||
C32_ScanRefs2_Probe(out);
|
||||
|
||||
load_ax = tests_get_word_lh(out + 0);
|
||||
res_off = tests_get_word_lh(out + 2);
|
||||
res_seg = tests_get_word_lh(out + 4);
|
||||
tramp_off = tests_get_word_lh(out + 6);
|
||||
tramp_seg = tests_get_word_lh(out + 8);
|
||||
fn_off = tests_get_word_lh(out + 10);
|
||||
fn_seg = tests_get_word_lh(out + 12);
|
||||
ret_ax = tests_get_word_lh(out + 14);
|
||||
ret_dx = tests_get_word_lh(out + 16);
|
||||
cref_lo = tests_get_word_lh(out + 18);
|
||||
cref_hi = tests_get_word_lh(out + 20);
|
||||
rinfo_lo = tests_get_word_lh(out + 22);
|
||||
rinfo_hi = tests_get_word_lh(out + 24);
|
||||
iter_lo = tests_get_word_lh(out + 26);
|
||||
iter_hi = tests_get_word_lh(out + 28);
|
||||
|
||||
fprintf(stdout, "Load AX=%04X Resolver=%04X:%04X Tramp=%04X:%04X\n",
|
||||
load_ax, res_seg, res_off, tramp_seg, tramp_off);
|
||||
fprintf(stdout, "Function CONNScanInfo=%04X:%04X\n", fn_seg, fn_off);
|
||||
fprintf(stdout, "Return DX:AX=%04X:%04X\n", ret_dx, ret_ax);
|
||||
fprintf(stdout, "connRef=%04X:%04X returnInfo=%04X:%04X iterator=%04X:%04X\n",
|
||||
cref_hi, cref_lo, rinfo_hi, rinfo_lo, iter_hi, iter_lo);
|
||||
tests_dump_bytes("OUT:", out, 30);
|
||||
|
||||
if (ret_ax == 0 && ret_dx == 0 && (cref_lo || cref_hi)) {
|
||||
fprintf(stdout, "\nTry next:\n");
|
||||
fprintf(stdout, " TESTS C32OPENREF %u %u\n", cref_lo, cref_hi);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
int func_tests(int argc, char *argv[], int mode)
|
||||
{
|
||||
if (argc >= 2) {
|
||||
@@ -1642,6 +1689,9 @@ int func_tests(int argc, char *argv[], int mode)
|
||||
if (tests_same_arg(argv[1], "C32SCANFIRST"))
|
||||
return tests_c32scanfirst();
|
||||
|
||||
if (tests_same_arg(argv[1], "C32SCANREFS2"))
|
||||
return tests_c32scanrefs2();
|
||||
|
||||
if (tests_same_arg(argv[1], "NWREQ87C32MATRIX"))
|
||||
return tests_nwreq87c32matrix();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user