Skip to content
This repository
Browse code

check result of orders unitary test

  • Loading branch information...
commit 125a4421e394638cbba92770101352d7729274b8 1 parent df08643
Hardening hardening authored

Showing 1 changed file with 21 additions and 21 deletions. Show diff stats Hide diff stats

  1. +21 21 cunit/test_orders.c
42 cunit/test_orders.c
@@ -83,7 +83,7 @@ void test_read_dstblt_order(void)
83 83 orderInfo->fieldFlags = 0x0C;
84 84 memset(&dstblt, 0, sizeof(DSTBLT_ORDER));
85 85
86   - update_read_dstblt_order(s, orderInfo, &dstblt);
  86 + CU_ASSERT(update_read_dstblt_order(s, orderInfo, &dstblt));
87 87
88 88 CU_ASSERT(dstblt.nLeftRect == 0);
89 89 CU_ASSERT(dstblt.nTopRect == 0);
@@ -108,7 +108,7 @@ void test_read_patblt_order(void)
108 108 orderInfo->fieldFlags = 0x027F;
109 109 memset(&patblt, 0, sizeof(PATBLT_ORDER));
110 110
111   - update_read_patblt_order(s, orderInfo, &patblt);
  111 + CU_ASSERT(update_read_patblt_order(s, orderInfo, &patblt));
112 112
113 113 CU_ASSERT(patblt.nLeftRect == 26);
114 114 CU_ASSERT(patblt.nTopRect == 451);
@@ -138,7 +138,7 @@ void test_read_scrblt_order(void)
138 138 orderInfo->fieldFlags = 0x7D;
139 139 memset(&scrblt, 0, sizeof(SCRBLT_ORDER));
140 140
141   - update_read_scrblt_order(s, orderInfo, &scrblt);
  141 + CU_ASSERT(update_read_scrblt_order(s, orderInfo, &scrblt));
142 142
143 143 CU_ASSERT(scrblt.nLeftRect == 7);
144 144 CU_ASSERT(scrblt.nTopRect == 0);
@@ -165,7 +165,7 @@ void test_read_opaque_rect_order(void)
165 165 orderInfo->fieldFlags = 0x7C;
166 166 memset(&opaque_rect, 0, sizeof(OPAQUE_RECT_ORDER));
167 167
168   - update_read_opaque_rect_order(s, orderInfo, &opaque_rect);
  168 + CU_ASSERT(update_read_opaque_rect_order(s, orderInfo, &opaque_rect));
169 169
170 170 CU_ASSERT(opaque_rect.nLeftRect == 0);
171 171 CU_ASSERT(opaque_rect.nTopRect == 0);
@@ -194,7 +194,7 @@ void test_read_draw_nine_grid_order(void)
194 194 draw_nine_grid.srcRight = 38;
195 195 draw_nine_grid.srcBottom = 40;
196 196
197   - update_read_draw_nine_grid_order(s, orderInfo, &draw_nine_grid);
  197 + CU_ASSERT(update_read_draw_nine_grid_order(s, orderInfo, &draw_nine_grid));
198 198
199 199 CU_ASSERT(draw_nine_grid.srcLeft == 0);
200 200 CU_ASSERT(draw_nine_grid.srcTop == 0);
@@ -223,7 +223,7 @@ void test_read_multi_opaque_rect_order(void)
223 223 orderInfo->fieldFlags = 0x01BF;
224 224 memset(&multi_opaque_rect, 0, sizeof(MULTI_OPAQUE_RECT_ORDER));
225 225
226   - update_read_multi_opaque_rect_order(s, orderInfo, &multi_opaque_rect);
  226 + CU_ASSERT(update_read_multi_opaque_rect_order(s, orderInfo, &multi_opaque_rect));
227 227
228 228 CU_ASSERT(multi_opaque_rect.nLeftRect == 391);
229 229 CU_ASSERT(multi_opaque_rect.nTopRect == 284);
@@ -276,7 +276,7 @@ void test_read_line_to_order(void)
276 276 line_to.nXEnd = 829;
277 277 line_to.nYEnd = 347;
278 278
279   - update_read_line_to_order(s, orderInfo, &line_to);
  279 + CU_ASSERT(update_read_line_to_order(s, orderInfo, &line_to));
280 280
281 281 CU_ASSERT(line_to.nXStart == 829);
282 282 CU_ASSERT(line_to.nYStart == 271);
@@ -314,7 +314,7 @@ void test_read_polyline_order(void)
314 314
315 315 memset(&polyline, 0, sizeof(POLYLINE_ORDER));
316 316
317   - update_read_polyline_order(s, orderInfo, &polyline);
  317 + CU_ASSERT(update_read_polyline_order(s, orderInfo, &polyline));
318 318
319 319 CU_ASSERT(polyline.xStart == 504);
320 320 CU_ASSERT(polyline.yStart == 696);
@@ -383,7 +383,7 @@ void test_read_glyph_index_order(void)
383 383
384 384 memset(&glyph_index, 0, sizeof(GLYPH_INDEX_ORDER));
385 385
386   - update_read_glyph_index_order(s, orderInfo, &glyph_index);
  386 + CU_ASSERT(update_read_glyph_index_order(s, orderInfo, &glyph_index));
387 387
388 388 CU_ASSERT(glyph_index.bkRight == 618);
389 389
@@ -397,7 +397,7 @@ void test_read_glyph_index_order(void)
397 397
398 398 memset(&glyph_index, 0, sizeof(GLYPH_INDEX_ORDER));
399 399
400   - update_read_glyph_index_order(s, orderInfo, &glyph_index);
  400 + CU_ASSERT(update_read_glyph_index_order(s, orderInfo, &glyph_index));
401 401
402 402 CU_ASSERT(glyph_index.fOpRedundant == 0);
403 403 CU_ASSERT(glyph_index.foreColor == 0x00FFFFFF);
@@ -432,7 +432,7 @@ void test_read_fast_index_order(void)
432 432 orderInfo->fieldFlags = 0x70FF;
433 433
434 434 memset(&fast_index, 0, sizeof(FAST_INDEX_ORDER));
435   - update_read_fast_index_order(s, orderInfo, &fast_index);
  435 + CU_ASSERT(update_read_fast_index_order(s, orderInfo, &fast_index));
436 436
437 437 CU_ASSERT(fast_index.cacheId == 7);
438 438 CU_ASSERT(fast_index.flAccel == 3);
@@ -471,7 +471,7 @@ void test_read_fast_glyph_order(void)
471 471
472 472 memset(&fast_glyph, 0, sizeof(FAST_GLYPH_ORDER));
473 473
474   - update_read_fast_glyph_order(s, orderInfo, &fast_glyph);
  474 + CU_ASSERT(update_read_fast_glyph_order(s, orderInfo, &fast_glyph));
475 475
476 476 CU_ASSERT(fast_glyph.backColor == 0);
477 477 CU_ASSERT(fast_glyph.foreColor == 0x0000FFFF);
@@ -506,7 +506,7 @@ void test_read_polygon_cb_order(void)
506 506
507 507 memset(&polygon_cb, 0, sizeof(POLYGON_CB_ORDER));
508 508
509   - update_read_polygon_cb_order(s, orderInfo, &polygon_cb);
  509 + CU_ASSERT(update_read_polygon_cb_order(s, orderInfo, &polygon_cb));
510 510
511 511 CU_ASSERT(polygon_cb.xStart == 234);
512 512 CU_ASSERT(polygon_cb.yStart == 326);
@@ -537,7 +537,7 @@ void test_read_cache_bitmap_order(void)
537 537
538 538 memset(&cache_bitmap, 0, sizeof(CACHE_BITMAP_ORDER));
539 539
540   - update_read_cache_bitmap_order(s, &cache_bitmap, TRUE, extraFlags);
  540 + CU_ASSERT(update_read_cache_bitmap_order(s, &cache_bitmap, TRUE, extraFlags));
541 541
542 542 CU_ASSERT(cache_bitmap.cacheId == 0);
543 543 CU_ASSERT(cache_bitmap.bitmapWidth == 16);
@@ -578,7 +578,7 @@ void test_read_cache_bitmap_v2_order(void)
578 578
579 579 memset(&cache_bitmap_v2, 0, sizeof(CACHE_BITMAP_V2_ORDER));
580 580
581   - update_read_cache_bitmap_v2_order(s, &cache_bitmap_v2, TRUE, extraFlags);
  581 + CB_ASSERT(update_read_cache_bitmap_v2_order(s, &cache_bitmap_v2, TRUE, extraFlags));
582 582
583 583 CU_ASSERT(cache_bitmap_v2.cacheId == 1);
584 584 CU_ASSERT(cache_bitmap_v2.bitmapBpp == 16);
@@ -609,7 +609,7 @@ void test_read_cache_bitmap_v3_order(void)
609 609
610 610 memset(&cache_bitmap_v3, 0, sizeof(CACHE_BITMAP_V3_ORDER));
611 611
612   - update_read_cache_bitmap_v3_order(s, &cache_bitmap_v3, TRUE, extraFlags);
  612 + CU_ASSERT(update_read_cache_bitmap_v3_order(s, &cache_bitmap_v3, TRUE, extraFlags));
613 613
614 614 CU_ASSERT(cache_bitmap_v3.cacheIndex == 32767);
615 615 CU_ASSERT(cache_bitmap_v3.key1 == 0xBCEC5035);
@@ -637,7 +637,7 @@ void test_read_cache_brush_order(void)
637 637
638 638 memset(&cache_brush, 0, sizeof(CACHE_BRUSH_ORDER));
639 639
640   - update_read_cache_brush_order(s, &cache_brush, 0);
  640 + CU_ASSERT(update_read_cache_brush_order(s, &cache_brush, 0));
641 641
642 642 CU_ASSERT(cache_brush.index == 0);
643 643 CU_ASSERT(cache_brush.bpp == 1);
@@ -667,7 +667,7 @@ void test_read_create_offscreen_bitmap_order(void)
667 667 deleteList->sIndices = 16;
668 668 deleteList->indices = malloc(sizeof(UINT16) * deleteList->sIndices);
669 669
670   - update_read_create_offscreen_bitmap_order(s, &create_offscreen_bitmap);
  670 + CU_ASSERT(update_read_create_offscreen_bitmap_order(s, &create_offscreen_bitmap));
671 671
672 672 CU_ASSERT(create_offscreen_bitmap.id == 0);
673 673 CU_ASSERT(create_offscreen_bitmap.cx == 352);
@@ -689,7 +689,7 @@ void test_read_switch_surface_order(void)
689 689
690 690 memset(&switch_surface, 0, sizeof(SWITCH_SURFACE_ORDER));
691 691
692   - update_read_switch_surface_order(s, &switch_surface);
  692 + CU_ASSERT(update_read_switch_surface_order(s, &switch_surface));
693 693
694 694 CU_ASSERT(switch_surface.bitmapId == 0xFFFF);
695 695
@@ -754,7 +754,7 @@ void test_update_recv_orders(void)
754 754 s->p = s->data = orders_update_1;
755 755 s->size = sizeof(orders_update_1);
756 756
757   - update_recv(update, s);
  757 + CU_ASSERT(update_recv(update, s));
758 758
759 759 CU_ASSERT(opaque_rect_count == 5);
760 760 CU_ASSERT(polyline_count == 2);
@@ -763,7 +763,7 @@ void test_update_recv_orders(void)
763 763 s->p = s->data = orders_update_2;
764 764 s->size = sizeof(orders_update_2);
765 765
766   - update_recv(update, s);
  766 + CU_ASSERT(update_recv(update, s));
767 767
768 768 CU_ASSERT(patblt_count == 3);
769 769

0 comments on commit 125a442

Please sign in to comment.
Something went wrong with that request. Please try again.