Lines Matching full:expected
25 static void print_changes(cups_page_header2_t *header, cups_page_header2_t *expected);
132 expected; /* Expected page header */ in do_raster_tests() local
303 memset(&expected, 0, sizeof(expected)); in do_raster_tests()
304 expected.cupsWidth = 256; in do_raster_tests()
305 expected.cupsHeight = 256; in do_raster_tests()
306 expected.cupsBytesPerLine = 256; in do_raster_tests()
307 expected.HWResolution[0] = 64; in do_raster_tests()
308 expected.HWResolution[1] = 64; in do_raster_tests()
309 expected.PageSize[0] = 288; in do_raster_tests()
310 expected.PageSize[1] = 288; in do_raster_tests()
312 strlcpy(expected.MediaType, "auto", sizeof(expected.MediaType)); in do_raster_tests()
316 expected.cupsPageSize[0] = 288.0f; in do_raster_tests()
317 expected.cupsPageSize[1] = 288.0f; in do_raster_tests()
322 strlcpy(expected.MediaClass, "PwgRaster", sizeof(expected.MediaClass)); in do_raster_tests()
323 expected.cupsInteger[7] = 0xffffff; in do_raster_tests()
328 expected.cupsBytesPerLine *= 4; in do_raster_tests()
329 expected.cupsColorSpace = CUPS_CSPACE_CMYK; in do_raster_tests()
330 expected.cupsColorOrder = CUPS_ORDER_CHUNKED; in do_raster_tests()
331 expected.cupsNumColors = 4; in do_raster_tests()
335 expected.cupsColorSpace = CUPS_CSPACE_W; in do_raster_tests()
336 expected.cupsColorOrder = CUPS_ORDER_CHUNKED; in do_raster_tests()
337 expected.cupsNumColors = 1; in do_raster_tests()
342 expected.cupsBytesPerLine *= 2; in do_raster_tests()
343 expected.cupsBitsPerColor = 16; in do_raster_tests()
344 expected.cupsBitsPerPixel = (page & 1) ? 64 : 16; in do_raster_tests()
348 expected.cupsBitsPerColor = 8; in do_raster_tests()
349 expected.cupsBitsPerPixel = (page & 1) ? 32 : 8; in do_raster_tests()
361 else if (memcmp(&header, &expected, sizeof(header))) in do_raster_tests()
365 print_changes(&header, &expected); in do_raster_tests()
395 printf(" %4u %02X (expected %02X)\n", x, data[x], 0); in do_raster_tests()
432 printf(" %4u %02X (expected %02X)\n", x, data[x], x & 255); in do_raster_tests()
465 printf(" %4u %02X (expected %02X)\n", x, data[x], 255); in do_raster_tests()
502 printf(" %4u %02X (expected %02X)\n", x, data[x], (x / 4) & 255); in do_raster_tests()
532 cups_page_header2_t *expected) /* I - Expected page header */ in print_changes() argument
537 if (strcmp(header->MediaClass, expected->MediaClass)) in print_changes()
538 printf(" MediaClass (%s), expected (%s)\n", header->MediaClass, in print_changes()
539 expected->MediaClass); in print_changes()
541 if (strcmp(header->MediaColor, expected->MediaColor)) in print_changes()
542 printf(" MediaColor (%s), expected (%s)\n", header->MediaColor, in print_changes()
543 expected->MediaColor); in print_changes()
545 if (strcmp(header->MediaType, expected->MediaType)) in print_changes()
546 printf(" MediaType (%s), expected (%s)\n", header->MediaType, in print_changes()
547 expected->MediaType); in print_changes()
549 if (strcmp(header->OutputType, expected->OutputType)) in print_changes()
550 printf(" OutputType (%s), expected (%s)\n", header->OutputType, in print_changes()
551 expected->OutputType); in print_changes()
553 if (header->AdvanceDistance != expected->AdvanceDistance) in print_changes()
554 printf(" AdvanceDistance %d, expected %d\n", header->AdvanceDistance, in print_changes()
555 expected->AdvanceDistance); in print_changes()
557 if (header->AdvanceMedia != expected->AdvanceMedia) in print_changes()
558 printf(" AdvanceMedia %d, expected %d\n", header->AdvanceMedia, in print_changes()
559 expected->AdvanceMedia); in print_changes()
561 if (header->Collate != expected->Collate) in print_changes()
562 printf(" Collate %d, expected %d\n", header->Collate, in print_changes()
563 expected->Collate); in print_changes()
565 if (header->CutMedia != expected->CutMedia) in print_changes()
566 printf(" CutMedia %d, expected %d\n", header->CutMedia, in print_changes()
567 expected->CutMedia); in print_changes()
569 if (header->Duplex != expected->Duplex) in print_changes()
570 printf(" Duplex %d, expected %d\n", header->Duplex, in print_changes()
571 expected->Duplex); in print_changes()
573 if (header->HWResolution[0] != expected->HWResolution[0] || in print_changes()
574 header->HWResolution[1] != expected->HWResolution[1]) in print_changes()
575 printf(" HWResolution [%d %d], expected [%d %d]\n", in print_changes()
577 expected->HWResolution[0], expected->HWResolution[1]); in print_changes()
579 if (memcmp(header->ImagingBoundingBox, expected->ImagingBoundingBox, in print_changes()
581 printf(" ImagingBoundingBox [%d %d %d %d], expected [%d %d %d %d]\n", in print_changes()
586 expected->ImagingBoundingBox[0], in print_changes()
587 expected->ImagingBoundingBox[1], in print_changes()
588 expected->ImagingBoundingBox[2], in print_changes()
589 expected->ImagingBoundingBox[3]); in print_changes()
591 if (header->InsertSheet != expected->InsertSheet) in print_changes()
592 printf(" InsertSheet %d, expected %d\n", header->InsertSheet, in print_changes()
593 expected->InsertSheet); in print_changes()
595 if (header->Jog != expected->Jog) in print_changes()
596 printf(" Jog %d, expected %d\n", header->Jog, in print_changes()
597 expected->Jog); in print_changes()
599 if (header->LeadingEdge != expected->LeadingEdge) in print_changes()
600 printf(" LeadingEdge %d, expected %d\n", header->LeadingEdge, in print_changes()
601 expected->LeadingEdge); in print_changes()
603 if (header->Margins[0] != expected->Margins[0] || in print_changes()
604 header->Margins[1] != expected->Margins[1]) in print_changes()
605 printf(" Margins [%d %d], expected [%d %d]\n", in print_changes()
607 expected->Margins[0], expected->Margins[1]); in print_changes()
609 if (header->ManualFeed != expected->ManualFeed) in print_changes()
610 printf(" ManualFeed %d, expected %d\n", header->ManualFeed, in print_changes()
611 expected->ManualFeed); in print_changes()
613 if (header->MediaPosition != expected->MediaPosition) in print_changes()
614 printf(" MediaPosition %d, expected %d\n", header->MediaPosition, in print_changes()
615 expected->MediaPosition); in print_changes()
617 if (header->MediaWeight != expected->MediaWeight) in print_changes()
618 printf(" MediaWeight %d, expected %d\n", header->MediaWeight, in print_changes()
619 expected->MediaWeight); in print_changes()
621 if (header->MirrorPrint != expected->MirrorPrint) in print_changes()
622 printf(" MirrorPrint %d, expected %d\n", header->MirrorPrint, in print_changes()
623 expected->MirrorPrint); in print_changes()
625 if (header->NegativePrint != expected->NegativePrint) in print_changes()
626 printf(" NegativePrint %d, expected %d\n", header->NegativePrint, in print_changes()
627 expected->NegativePrint); in print_changes()
629 if (header->NumCopies != expected->NumCopies) in print_changes()
630 printf(" NumCopies %d, expected %d\n", header->NumCopies, in print_changes()
631 expected->NumCopies); in print_changes()
633 if (header->Orientation != expected->Orientation) in print_changes()
634 printf(" Orientation %d, expected %d\n", header->Orientation, in print_changes()
635 expected->Orientation); in print_changes()
637 if (header->OutputFaceUp != expected->OutputFaceUp) in print_changes()
638 printf(" OutputFaceUp %d, expected %d\n", header->OutputFaceUp, in print_changes()
639 expected->OutputFaceUp); in print_changes()
641 if (header->PageSize[0] != expected->PageSize[0] || in print_changes()
642 header->PageSize[1] != expected->PageSize[1]) in print_changes()
643 printf(" PageSize [%d %d], expected [%d %d]\n", in print_changes()
645 expected->PageSize[0], expected->PageSize[1]); in print_changes()
647 if (header->Separations != expected->Separations) in print_changes()
648 printf(" Separations %d, expected %d\n", header->Separations, in print_changes()
649 expected->Separations); in print_changes()
651 if (header->TraySwitch != expected->TraySwitch) in print_changes()
652 printf(" TraySwitch %d, expected %d\n", header->TraySwitch, in print_changes()
653 expected->TraySwitch); in print_changes()
655 if (header->Tumble != expected->Tumble) in print_changes()
656 printf(" Tumble %d, expected %d\n", header->Tumble, in print_changes()
657 expected->Tumble); in print_changes()
659 if (header->cupsWidth != expected->cupsWidth) in print_changes()
660 printf(" cupsWidth %d, expected %d\n", header->cupsWidth, in print_changes()
661 expected->cupsWidth); in print_changes()
663 if (header->cupsHeight != expected->cupsHeight) in print_changes()
664 printf(" cupsHeight %d, expected %d\n", header->cupsHeight, in print_changes()
665 expected->cupsHeight); in print_changes()
667 if (header->cupsMediaType != expected->cupsMediaType) in print_changes()
668 printf(" cupsMediaType %d, expected %d\n", header->cupsMediaType, in print_changes()
669 expected->cupsMediaType); in print_changes()
671 if (header->cupsBitsPerColor != expected->cupsBitsPerColor) in print_changes()
672 printf(" cupsBitsPerColor %d, expected %d\n", header->cupsBitsPerColor, in print_changes()
673 expected->cupsBitsPerColor); in print_changes()
675 if (header->cupsBitsPerPixel != expected->cupsBitsPerPixel) in print_changes()
676 printf(" cupsBitsPerPixel %d, expected %d\n", header->cupsBitsPerPixel, in print_changes()
677 expected->cupsBitsPerPixel); in print_changes()
679 if (header->cupsBytesPerLine != expected->cupsBytesPerLine) in print_changes()
680 printf(" cupsBytesPerLine %d, expected %d\n", header->cupsBytesPerLine, in print_changes()
681 expected->cupsBytesPerLine); in print_changes()
683 if (header->cupsColorOrder != expected->cupsColorOrder) in print_changes()
684 printf(" cupsColorOrder %d, expected %d\n", header->cupsColorOrder, in print_changes()
685 expected->cupsColorOrder); in print_changes()
687 if (header->cupsColorSpace != expected->cupsColorSpace) in print_changes()
688 printf(" cupsColorSpace %d, expected %d\n", header->cupsColorSpace, in print_changes()
689 expected->cupsColorSpace); in print_changes()
691 if (header->cupsCompression != expected->cupsCompression) in print_changes()
692 printf(" cupsCompression %d, expected %d\n", header->cupsCompression, in print_changes()
693 expected->cupsCompression); in print_changes()
695 if (header->cupsRowCount != expected->cupsRowCount) in print_changes()
696 printf(" cupsRowCount %d, expected %d\n", header->cupsRowCount, in print_changes()
697 expected->cupsRowCount); in print_changes()
699 if (header->cupsRowFeed != expected->cupsRowFeed) in print_changes()
700 printf(" cupsRowFeed %d, expected %d\n", header->cupsRowFeed, in print_changes()
701 expected->cupsRowFeed); in print_changes()
703 if (header->cupsRowStep != expected->cupsRowStep) in print_changes()
704 printf(" cupsRowStep %d, expected %d\n", header->cupsRowStep, in print_changes()
705 expected->cupsRowStep); in print_changes()
707 if (header->cupsNumColors != expected->cupsNumColors) in print_changes()
708 printf(" cupsNumColors %d, expected %d\n", header->cupsNumColors, in print_changes()
709 expected->cupsNumColors); in print_changes()
711 if (fabs(header->cupsBorderlessScalingFactor - expected->cupsBorderlessScalingFactor) > 0.001) in print_changes()
712 printf(" cupsBorderlessScalingFactor %g, expected %g\n", in print_changes()
714 expected->cupsBorderlessScalingFactor); in print_changes()
716 if (fabs(header->cupsPageSize[0] - expected->cupsPageSize[0]) > 0.001 || in print_changes()
717 fabs(header->cupsPageSize[1] - expected->cupsPageSize[1]) > 0.001) in print_changes()
718 printf(" cupsPageSize [%g %g], expected [%g %g]\n", in print_changes()
720 expected->cupsPageSize[0], expected->cupsPageSize[1]); in print_changes()
722 if (fabs(header->cupsImagingBBox[0] - expected->cupsImagingBBox[0]) > 0.001 || in print_changes()
723 fabs(header->cupsImagingBBox[1] - expected->cupsImagingBBox[1]) > 0.001 || in print_changes()
724 fabs(header->cupsImagingBBox[2] - expected->cupsImagingBBox[2]) > 0.001 || in print_changes()
725 fabs(header->cupsImagingBBox[3] - expected->cupsImagingBBox[3]) > 0.001) in print_changes()
726 printf(" cupsImagingBBox [%g %g %g %g], expected [%g %g %g %g]\n", in print_changes()
729 expected->cupsImagingBBox[0], expected->cupsImagingBBox[1], in print_changes()
730 expected->cupsImagingBBox[2], expected->cupsImagingBBox[3]); in print_changes()
733 if (header->cupsInteger[i] != expected->cupsInteger[i]) in print_changes()
734 printf(" cupsInteger%d %d, expected %d\n", i, header->cupsInteger[i], in print_changes()
735 expected->cupsInteger[i]); in print_changes()
738 if (fabs(header->cupsReal[i] - expected->cupsReal[i]) > 0.001) in print_changes()
739 printf(" cupsReal%d %g, expected %g\n", i, header->cupsReal[i], in print_changes()
740 expected->cupsReal[i]); in print_changes()
743 if (strcmp(header->cupsString[i], expected->cupsString[i])) in print_changes()
744 printf(" cupsString%d (%s), expected (%s)\n", i, in print_changes()
745 header->cupsString[i], expected->cupsString[i]); in print_changes()
747 if (strcmp(header->cupsMarkerType, expected->cupsMarkerType)) in print_changes()
748 printf(" cupsMarkerType (%s), expected (%s)\n", header->cupsMarkerType, in print_changes()
749 expected->cupsMarkerType); in print_changes()
751 if (strcmp(header->cupsRenderingIntent, expected->cupsRenderingIntent)) in print_changes()
752 printf(" cupsRenderingIntent (%s), expected (%s)\n", in print_changes()
754 expected->cupsRenderingIntent); in print_changes()
756 if (strcmp(header->cupsPageSizeName, expected->cupsPageSizeName)) in print_changes()
757 printf(" cupsPageSizeName (%s), expected (%s)\n", in print_changes()
759 expected->cupsPageSizeName); in print_changes()