(t *testing.T)
| 739 | } |
| 740 | |
| 741 | func TestColorBurn(t *testing.T) { |
| 742 | cases := []struct { |
| 743 | value0 image.Image |
| 744 | value1 image.Image |
| 745 | expected *image.RGBA |
| 746 | }{ |
| 747 | { |
| 748 | value0: &image.RGBA{ |
| 749 | Rect: image.Rect(0, 0, 2, 2), |
| 750 | Stride: 8, |
| 751 | Pix: []uint8{ |
| 752 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, |
| 753 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, |
| 754 | }, |
| 755 | }, |
| 756 | value1: &image.RGBA{ |
| 757 | Rect: image.Rect(0, 0, 2, 2), |
| 758 | Stride: 8, |
| 759 | Pix: []uint8{ |
| 760 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, |
| 761 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, |
| 762 | }, |
| 763 | }, |
| 764 | expected: &image.RGBA{ |
| 765 | Rect: image.Rect(0, 0, 2, 2), |
| 766 | Stride: 8, |
| 767 | Pix: []uint8{ |
| 768 | 0x40, 0x40, 0x40, 0xff, 0x40, 0x40, 0x40, 0xff, 0x40, 0x40, 0x40, 0xff, 0x40, 0x40, 0x40, 0xff, |
| 769 | }, |
| 770 | }, |
| 771 | }, |
| 772 | { |
| 773 | value0: &image.RGBA{ |
| 774 | Rect: image.Rect(0, 0, 2, 2), |
| 775 | Stride: 8, |
| 776 | Pix: []uint8{ |
| 777 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, |
| 778 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, |
| 779 | }, |
| 780 | }, |
| 781 | value1: &image.RGBA{ |
| 782 | Rect: image.Rect(0, 0, 2, 2), |
| 783 | Stride: 8, |
| 784 | Pix: []uint8{ |
| 785 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, |
| 786 | 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, |
| 787 | }, |
| 788 | }, |
| 789 | expected: &image.RGBA{ |
| 790 | Rect: image.Rect(0, 0, 2, 2), |
| 791 | Stride: 8, |
| 792 | Pix: []uint8{ |
| 793 | 0x1b, 0x1b, 0x1b, 0x40, 0x1b, 0x1b, 0x1b, 0x40, 0x1b, 0x1b, 0x1b, 0x40, 0x1b, 0x1b, 0x1b, 0x40, |
| 794 | }, |
| 795 | }, |
| 796 | }, |
| 797 | { |
| 798 | value0: &image.RGBA{ |
nothing calls this directly
no test coverage detected