Lines Matching refs:expect
302 struct captured_screen* expect) { in compare_screen() argument
308 ASSERT(expect->text); in compare_screen()
309 ASSERT(expect->attributes); in compare_screen()
310 if (actual->si.length != expect->si.length) { in compare_screen()
313 if (actual->si.width != expect->si.width) { in compare_screen()
316 if (actual->si.height != expect->si.height) { in compare_screen()
320 if (*(actual->text + current) != *(expect->text + current)) { in compare_screen()
327 *(expect->text + current), in compare_screen()
331 if (*(actual->attributes + current) != *(expect->attributes + current)) { in compare_screen()
338 *(expect->attributes + current), in compare_screen()
344 clear_screen(tty_out, &expect->si); in compare_screen()
345 free_screen(expect); in compare_screen()
845 struct captured_screen actual = {0}, expect = {0}; in TEST_IMPL()
854 capture_screen(&tty_out, &expect); in TEST_IMPL()
855 cursor_pos.X = expect.si.width / 2; in TEST_IMPL()
856 cursor_pos.Y = expect.si.height / 2; in TEST_IMPL()
857 make_expect_screen_erase(&expect, cursor_pos, dir, TRUE); in TEST_IMPL()
864 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
868 capture_screen(&tty_out, &expect); in TEST_IMPL()
869 make_expect_screen_erase(&expect, cursor_pos, dir, TRUE); in TEST_IMPL()
876 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
881 capture_screen(&tty_out, &expect); in TEST_IMPL()
882 make_expect_screen_erase(&expect, cursor_pos, dir, TRUE); in TEST_IMPL()
889 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
894 capture_screen(&tty_out, &expect); in TEST_IMPL()
895 make_expect_screen_erase(&expect, cursor_pos, dir, TRUE); in TEST_IMPL()
902 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
919 struct captured_screen actual = {0}, expect = {0}; in TEST_IMPL()
928 capture_screen(&tty_out, &expect); in TEST_IMPL()
929 cursor_pos.X = expect.si.width / 2; in TEST_IMPL()
930 cursor_pos.Y = expect.si.height / 2; in TEST_IMPL()
931 make_expect_screen_erase(&expect, cursor_pos, dir, FALSE); in TEST_IMPL()
938 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
942 capture_screen(&tty_out, &expect); in TEST_IMPL()
943 make_expect_screen_erase(&expect, cursor_pos, dir, FALSE); in TEST_IMPL()
950 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
955 capture_screen(&tty_out, &expect); in TEST_IMPL()
956 make_expect_screen_erase(&expect, cursor_pos, dir, FALSE); in TEST_IMPL()
963 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
968 capture_screen(&tty_out, &expect); in TEST_IMPL()
969 make_expect_screen_erase(&expect, cursor_pos, dir, FALSE); in TEST_IMPL()
976 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1055 struct captured_screen actual = {0}, expect = {0}; in TEST_IMPL()
1082 capture_screen(&tty_out, &expect); in TEST_IMPL()
1083 fg_attrs[8][1] = expect.si.default_attr & FOREGROUND_WHITE; in TEST_IMPL()
1084 bg_attrs[0][1] = expect.si.default_attr & BACKGROUND_WHITE; in TEST_IMPL()
1089 capture_screen(&tty_out, &expect); in TEST_IMPL()
1090 cursor_pos.X = expect.si.width / 2; in TEST_IMPL()
1091 cursor_pos.Y = expect.si.height / 2; in TEST_IMPL()
1092 attr = (expect.si.default_attr & ~FOREGROUND_WHITE) | fg_attrs[i][1]; in TEST_IMPL()
1093 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1094 make_expect_screen_set_attr(&expect, cursor_pos, strlen(HELLO), attr); in TEST_IMPL()
1102 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1108 capture_screen(&tty_out, &expect); in TEST_IMPL()
1109 cursor_pos.X = expect.si.width / 2; in TEST_IMPL()
1110 cursor_pos.Y = expect.si.height / 2; in TEST_IMPL()
1111 attr = (expect.si.default_attr & ~BACKGROUND_WHITE) | bg_attrs[i][1]; in TEST_IMPL()
1112 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1113 make_expect_screen_set_attr(&expect, cursor_pos, strlen(HELLO), attr); in TEST_IMPL()
1121 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1128 capture_screen(&tty_out, &expect); in TEST_IMPL()
1129 cursor_pos.X = expect.si.width / 2; in TEST_IMPL()
1130 cursor_pos.Y = expect.si.height / 2; in TEST_IMPL()
1131 attr = expect.si.default_attr & ~FOREGROUND_WHITE & ~BACKGROUND_WHITE; in TEST_IMPL()
1133 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1134 make_expect_screen_set_attr(&expect, cursor_pos, strlen(HELLO), attr); in TEST_IMPL()
1148 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1152 capture_screen(&tty_out, &expect); in TEST_IMPL()
1153 cursor_pos.X = expect.si.width / 2; in TEST_IMPL()
1154 cursor_pos.Y = expect.si.height / 2; in TEST_IMPL()
1156 attr = expect.si.default_attr; in TEST_IMPL()
1158 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1159 make_expect_screen_set_attr(&expect, cursor_pos, strlen(HELLO), attr); in TEST_IMPL()
1161 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1162 make_expect_screen_set_attr(&expect, cursor_pos, strlen(HELLO), attr); in TEST_IMPL()
1180 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1183 capture_screen(&tty_out, &expect); in TEST_IMPL()
1184 cursor_pos.X = expect.si.width / 2; in TEST_IMPL()
1185 cursor_pos.Y = expect.si.height / 2; in TEST_IMPL()
1187 attr = expect.si.default_attr; in TEST_IMPL()
1189 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1190 make_expect_screen_set_attr(&expect, cursor_pos, strlen(HELLO), attr); in TEST_IMPL()
1203 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1206 capture_screen(&tty_out, &expect); in TEST_IMPL()
1207 cursor_pos.X = expect.si.width / 2; in TEST_IMPL()
1208 cursor_pos.Y = expect.si.height / 2; in TEST_IMPL()
1210 attr = expect.si.default_attr; in TEST_IMPL()
1217 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1218 make_expect_screen_set_attr(&expect, cursor_pos, strlen(HELLO), attr); in TEST_IMPL()
1220 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1234 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1309 struct captured_screen actual = {0}, expect = {0}; in TEST_IMPL()
1318 capture_screen(&tty_out, &expect); in TEST_IMPL()
1320 cursor_pos.X = expect.si.width; in TEST_IMPL()
1321 cursor_pos.Y = expect.si.height; in TEST_IMPL()
1334 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1358 struct captured_screen actual = {0}, expect = {0}; in TEST_IMPL()
1369 capture_screen(&tty_out, &expect); in TEST_IMPL()
1370 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1372 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1376 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1382 capture_screen(&tty_out, &expect); in TEST_IMPL()
1383 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1385 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1389 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1395 capture_screen(&tty_out, &expect); in TEST_IMPL()
1396 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1398 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1402 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1408 capture_screen(&tty_out, &expect); in TEST_IMPL()
1418 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1420 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1422 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1425 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1431 capture_screen(&tty_out, &expect); in TEST_IMPL()
1432 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1434 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1438 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1445 capture_screen(&tty_out, &expect); in TEST_IMPL()
1446 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1450 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1455 capture_screen(&tty_out, &expect); in TEST_IMPL()
1456 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1460 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1465 capture_screen(&tty_out, &expect); in TEST_IMPL()
1466 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1477 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1482 capture_screen(&tty_out, &expect); in TEST_IMPL()
1483 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1495 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1501 capture_screen(&tty_out, &expect); in TEST_IMPL()
1502 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1504 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1516 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1530 capture_screen(&tty_out, &expect); in TEST_IMPL()
1531 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1545 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1553 expect.si.height / 2, in TEST_IMPL()
1554 expect.si.width / 2); in TEST_IMPL()
1578 cursor_pos_old.X = expect.si.width / 2; in TEST_IMPL()
1579 cursor_pos_old.Y = expect.si.height / 2; in TEST_IMPL()
1585 expect.si.height / 4, in TEST_IMPL()
1586 expect.si.width / 4); in TEST_IMPL()
1601 capture_screen(&tty_out, &expect); in TEST_IMPL()
1606 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()
1609 cursor_pos.X = expect.si.width / 2; in TEST_IMPL()
1610 cursor_pos.Y = expect.si.height / 2; in TEST_IMPL()
1612 capture_screen(&tty_out, &expect); in TEST_IMPL()
1613 make_expect_screen_write(&expect, cursor_pos, HELLO); in TEST_IMPL()
1617 ASSERT(compare_screen(&tty_out, &actual, &expect)); in TEST_IMPL()