GCC Code Coverage Report


Directory: src/gate/
File: src/gate/graphics/tests/gategraphics_cpp_test/test_images.cpp
Date: 2026-06-21 00:38:37
Exec Total Coverage
Lines: 117 117 100.0%
Functions: 17 17 100.0%
Branches: 280 819 34.2%

Line Branch Exec Source
1 #include "gate/tests.hpp"
2 #include "gate/graphics/images.hpp"
3 #include "gate/graphics/drawing.hpp"
4 #include "gate/graphics/imageformats.hpp"
5 #include "gate/graphics/pixmapimages.hpp"
6 #include "gate/graphics/bitmapimages.hpp"
7 #include "gate/graphics/gifimages.hpp"
8 #include "gate/graphics/jpegimages.hpp"
9 #include "gate/graphics/pngimages.hpp"
10
11 using namespace gate;
12 using namespace gate::graph;
13
14
2/7
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
6 GATEXX_TEST_UNIT(Images)
15 {
16
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage emptyImage;
17
5/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 1 times.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
2 GATEXX_TEST_CHECK(!emptyImage == true);
18
19
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage image(64, 64);
20
5/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 1 times.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
2 GATEXX_TEST_CHECK(image.c_impl() != NULL);
21
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(image.getPixelFormat());
22
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(image.clear(Color::Black));
23
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(image.setPixel(32, 32, Color::White));
24
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(image.getPixel(32, 32));
25
5/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 1 times.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
2 GATEXX_TEST_CHECK(image.getPixelPtr(32, 32) != NULL);
26
27
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 Drawer d(image);
28
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(d.line(0, 0, 32, 16, Color::White));
29
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(d.rectangle(0, 0, 32, 16, Color::White));
30
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(d.box(48, 16, 54, 32, Color::White));
31
32
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage image2 = image.flipX();
33
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage image3 = image.flipY();
34
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage image4 = image.rollOver();
35
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage image5 = image.rotateLeft();
36
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage image6 = image.rotateRight();
37
38
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_argb4, image));
39
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_bgr24, image));
40
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_bgr32, image));
41
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_bgra, image));
42
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_gray8, image));
43
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_pal8, image));
44
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_rgb24, image));
45
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_rgb32, image));
46
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_rgb555, image));
47
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_rgb565, image));
48
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_rgba, image));
49
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_yuv2, image));
50
51
2/4
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
4 RasterImage dup(image.c_impl());
52
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(dup.makeGrayscale());
53
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(dup.makeMonochrome());
54
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage frame(128, 128);
55
2/4
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
2 frame.clear(Color(128, 128, 128, 128));
56
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(frame.paste(image, 32, 32, 0, 0, 64, 64, true));
57
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage subset;
58
5/16
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(subset = frame.subset(32, 32, 64, 64));
59
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage original(64, 64);
60
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(original.resampleFrom(subset));
61
62 2 }
63
64
65 5 static void checkImageFormats(RasterImage const& sourceImage, ImageFormats::FormatEnum format)
66 {
67
1/2
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
10 MemStream stream;
68
4/14
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 5 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5 GATEXX_TEST_CHECK_NOTHROW(ImageFormats::save(sourceImage, format, stream, 0));
69
1/2
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
10 RasterImage newImage = ImageFormats::load(format, stream, 0);
70
6/16
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 5 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 5 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 5 times.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
5 GATEXX_TEST_CHECK_EQUAL(newImage.getWidth(), sourceImage.getWidth());
71
6/16
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 5 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 5 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 5 times.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
5 GATEXX_TEST_CHECK_EQUAL(newImage.getHeight(), sourceImage.getHeight());
72 5 }
73
74
2/7
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
6 GATEXX_TEST_UNIT(ImageFormats)
75 {
76 2 unsigned dim = 128;
77
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage image(dim, dim);
78
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 image.clear(Color::Blue);
79
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 Drawer d(image);
80
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 d.line(0, 0, dim - 1, dim - 1, Color::Yellow);
81
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 d.rectangle(0, 0, dim - 1, dim - 1, Color::Green);
82
83
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 checkImageFormats(image, ImageFormats::Format_Bitmap);
84
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 checkImageFormats(image, ImageFormats::Format_Gif);
85
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 checkImageFormats(image, ImageFormats::Format_Jpeg);
86
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 checkImageFormats(image, ImageFormats::Format_Pixmap);
87
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 checkImageFormats(image, ImageFormats::Format_Png);
88
89
6/16
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
2 GATEXX_TEST_CHECK_EQUAL(ImageFormats::parseFileExtension(".bmp"), ImageFormats::Format_Bitmap);
90
6/16
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
2 GATEXX_TEST_CHECK_EQUAL(ImageFormats::parseFileExtension(".gif"), ImageFormats::Format_Gif);
91
6/16
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
2 GATEXX_TEST_CHECK_EQUAL(ImageFormats::parseFileExtension(".jpg"), ImageFormats::Format_Jpeg);
92
6/16
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
2 GATEXX_TEST_CHECK_EQUAL(ImageFormats::parseFileExtension(".jpeg"), ImageFormats::Format_Jpeg);
93
6/16
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
2 GATEXX_TEST_CHECK_EQUAL(ImageFormats::parseFileExtension(".xpm"), ImageFormats::Format_Pixmap);
94
6/16
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
2 GATEXX_TEST_CHECK_EQUAL(ImageFormats::parseFileExtension(".png"), ImageFormats::Format_Png);
95
96
6/16
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 1 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 1 times.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
2 GATEXX_TEST_CHECK_EQUAL(ImageFormats::getFileExtension(ImageFormats::Format_Bitmap), "bmp");
97
6/16
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 1 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 1 times.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
2 GATEXX_TEST_CHECK_EQUAL(ImageFormats::getFileExtension(ImageFormats::Format_Gif), "gif");
98
6/16
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 1 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 1 times.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
2 GATEXX_TEST_CHECK_EQUAL(ImageFormats::getFileExtension(ImageFormats::Format_Jpeg), "jpg");
99
6/16
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 1 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 1 times.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
2 GATEXX_TEST_CHECK_EQUAL(ImageFormats::getFileExtension(ImageFormats::Format_Pixmap), "xpm");
100
6/16
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 1 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 1 times.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
2 GATEXX_TEST_CHECK_EQUAL(ImageFormats::getFileExtension(ImageFormats::Format_Png), "png");
101 2 }
102
103 5 static void checkLoaderSaver(RasterImage const& sourceImage, ImageFormats::SaverFunction saver, ImageFormats::LoaderFunction loader)
104 {
105
1/2
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
10 MemStream stream;
106
4/14
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 5 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5 GATEXX_TEST_CHECK_NOTHROW(saver(sourceImage, stream, 0));
107
1/2
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
10 RasterImage newImage;
108
4/14
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 5 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
5 GATEXX_TEST_CHECK_NOTHROW(loader(newImage, stream, 0));
109 5 }
110
111
2/7
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
6 GATEXX_TEST_UNIT(ImageFormatsDirect)
112 {
113 2 unsigned dim = 128;
114
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage image(dim, dim);
115
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 image.clear(Color::Blue);
116
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 Drawer d(image);
117
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 d.line(0, 0, dim - 1, dim - 1, Color::Yellow);
118
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 d.rectangle(0, 0, dim - 1, dim - 1, Color::Green);
119
120
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 checkLoaderSaver(image, &PixmapImages::save, &PixmapImages::load);
121
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 checkLoaderSaver(image, &BitmapImages::save, &BitmapImages::load);
122
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 checkLoaderSaver(image, &JpegImages::save, &JpegImages::load);
123
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 checkLoaderSaver(image, &PngImages::save, &PngImages::load);
124
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 checkLoaderSaver(image, &GifImages::save, &GifImages::load);
125 2 }
126
127 static const uint8_t icon256[2102] = {
128 0x42, 0x4d, 0x36, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x04, 0x00, 0x00, 0x28, 0x00,
129 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00,
130 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0x00, 0x00,
131 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80,
132 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80,
133 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x00, 0xc0, 0xdc, 0xc0, 0x00, 0xf0, 0xca, 0xa6, 0x00, 0x00, 0x20,
134 0x40, 0x00, 0x00, 0x20, 0x60, 0x00, 0x00, 0x20, 0x80, 0x00, 0x00, 0x20, 0xa0, 0x00, 0x00, 0x20,
135 0xc0, 0x00, 0x00, 0x20, 0xe0, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x40,
136 0x40, 0x00, 0x00, 0x40, 0x60, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x40,
137 0xc0, 0x00, 0x00, 0x40, 0xe0, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x60,
138 0x40, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x80, 0x00, 0x00, 0x60, 0xa0, 0x00, 0x00, 0x60,
139 0xc0, 0x00, 0x00, 0x60, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00, 0x80,
140 0x40, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xa0, 0x00, 0x00, 0x80,
141 0xc0, 0x00, 0x00, 0x80, 0xe0, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xa0, 0x20, 0x00, 0x00, 0xa0,
142 0x40, 0x00, 0x00, 0xa0, 0x60, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0xa0, 0xa0, 0x00, 0x00, 0xa0,
143 0xc0, 0x00, 0x00, 0xa0, 0xe0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x00, 0x00, 0xc0,
144 0x40, 0x00, 0x00, 0xc0, 0x60, 0x00, 0x00, 0xc0, 0x80, 0x00, 0x00, 0xc0, 0xa0, 0x00, 0x00, 0xc0,
145 0xc0, 0x00, 0x00, 0xc0, 0xe0, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x20, 0x00, 0x00, 0xe0,
146 0x40, 0x00, 0x00, 0xe0, 0x60, 0x00, 0x00, 0xe0, 0x80, 0x00, 0x00, 0xe0, 0xa0, 0x00, 0x00, 0xe0,
147 0xc0, 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x20, 0x00, 0x40, 0x00,
148 0x40, 0x00, 0x40, 0x00, 0x60, 0x00, 0x40, 0x00, 0x80, 0x00, 0x40, 0x00, 0xa0, 0x00, 0x40, 0x00,
149 0xc0, 0x00, 0x40, 0x00, 0xe0, 0x00, 0x40, 0x20, 0x00, 0x00, 0x40, 0x20, 0x20, 0x00, 0x40, 0x20,
150 0x40, 0x00, 0x40, 0x20, 0x60, 0x00, 0x40, 0x20, 0x80, 0x00, 0x40, 0x20, 0xa0, 0x00, 0x40, 0x20,
151 0xc0, 0x00, 0x40, 0x20, 0xe0, 0x00, 0x40, 0x40, 0x00, 0x00, 0x40, 0x40, 0x20, 0x00, 0x40, 0x40,
152 0x40, 0x00, 0x40, 0x40, 0x60, 0x00, 0x40, 0x40, 0x80, 0x00, 0x40, 0x40, 0xa0, 0x00, 0x40, 0x40,
153 0xc0, 0x00, 0x40, 0x40, 0xe0, 0x00, 0x40, 0x60, 0x00, 0x00, 0x40, 0x60, 0x20, 0x00, 0x40, 0x60,
154 0x40, 0x00, 0x40, 0x60, 0x60, 0x00, 0x40, 0x60, 0x80, 0x00, 0x40, 0x60, 0xa0, 0x00, 0x40, 0x60,
155 0xc0, 0x00, 0x40, 0x60, 0xe0, 0x00, 0x40, 0x80, 0x00, 0x00, 0x40, 0x80, 0x20, 0x00, 0x40, 0x80,
156 0x40, 0x00, 0x40, 0x80, 0x60, 0x00, 0x40, 0x80, 0x80, 0x00, 0x40, 0x80, 0xa0, 0x00, 0x40, 0x80,
157 0xc0, 0x00, 0x40, 0x80, 0xe0, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x40, 0xa0, 0x20, 0x00, 0x40, 0xa0,
158 0x40, 0x00, 0x40, 0xa0, 0x60, 0x00, 0x40, 0xa0, 0x80, 0x00, 0x40, 0xa0, 0xa0, 0x00, 0x40, 0xa0,
159 0xc0, 0x00, 0x40, 0xa0, 0xe0, 0x00, 0x40, 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x20, 0x00, 0x40, 0xc0,
160 0x40, 0x00, 0x40, 0xc0, 0x60, 0x00, 0x40, 0xc0, 0x80, 0x00, 0x40, 0xc0, 0xa0, 0x00, 0x40, 0xc0,
161 0xc0, 0x00, 0x40, 0xc0, 0xe0, 0x00, 0x40, 0xe0, 0x00, 0x00, 0x40, 0xe0, 0x20, 0x00, 0x40, 0xe0,
162 0x40, 0x00, 0x40, 0xe0, 0x60, 0x00, 0x40, 0xe0, 0x80, 0x00, 0x40, 0xe0, 0xa0, 0x00, 0x40, 0xe0,
163 0xc0, 0x00, 0x40, 0xe0, 0xe0, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x20, 0x00, 0x80, 0x00,
164 0x40, 0x00, 0x80, 0x00, 0x60, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0xa0, 0x00, 0x80, 0x00,
165 0xc0, 0x00, 0x80, 0x00, 0xe0, 0x00, 0x80, 0x20, 0x00, 0x00, 0x80, 0x20, 0x20, 0x00, 0x80, 0x20,
166 0x40, 0x00, 0x80, 0x20, 0x60, 0x00, 0x80, 0x20, 0x80, 0x00, 0x80, 0x20, 0xa0, 0x00, 0x80, 0x20,
167 0xc0, 0x00, 0x80, 0x20, 0xe0, 0x00, 0x80, 0x40, 0x00, 0x00, 0x80, 0x40, 0x20, 0x00, 0x80, 0x40,
168 0x40, 0x00, 0x80, 0x40, 0x60, 0x00, 0x80, 0x40, 0x80, 0x00, 0x80, 0x40, 0xa0, 0x00, 0x80, 0x40,
169 0xc0, 0x00, 0x80, 0x40, 0xe0, 0x00, 0x80, 0x60, 0x00, 0x00, 0x80, 0x60, 0x20, 0x00, 0x80, 0x60,
170 0x40, 0x00, 0x80, 0x60, 0x60, 0x00, 0x80, 0x60, 0x80, 0x00, 0x80, 0x60, 0xa0, 0x00, 0x80, 0x60,
171 0xc0, 0x00, 0x80, 0x60, 0xe0, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x20, 0x00, 0x80, 0x80,
172 0x40, 0x00, 0x80, 0x80, 0x60, 0x00, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0xa0, 0x00, 0x80, 0x80,
173 0xc0, 0x00, 0x80, 0x80, 0xe0, 0x00, 0x80, 0xa0, 0x00, 0x00, 0x80, 0xa0, 0x20, 0x00, 0x80, 0xa0,
174 0x40, 0x00, 0x80, 0xa0, 0x60, 0x00, 0x80, 0xa0, 0x80, 0x00, 0x80, 0xa0, 0xa0, 0x00, 0x80, 0xa0,
175 0xc0, 0x00, 0x80, 0xa0, 0xe0, 0x00, 0x80, 0xc0, 0x00, 0x00, 0x80, 0xc0, 0x20, 0x00, 0x80, 0xc0,
176 0x40, 0x00, 0x80, 0xc0, 0x60, 0x00, 0x80, 0xc0, 0x80, 0x00, 0x80, 0xc0, 0xa0, 0x00, 0x80, 0xc0,
177 0xc0, 0x00, 0x80, 0xc0, 0xe0, 0x00, 0x80, 0xe0, 0x00, 0x00, 0x80, 0xe0, 0x20, 0x00, 0x80, 0xe0,
178 0x40, 0x00, 0x80, 0xe0, 0x60, 0x00, 0x80, 0xe0, 0x80, 0x00, 0x80, 0xe0, 0xa0, 0x00, 0x80, 0xe0,
179 0xc0, 0x00, 0x80, 0xe0, 0xe0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x20, 0x00, 0xc0, 0x00,
180 0x40, 0x00, 0xc0, 0x00, 0x60, 0x00, 0xc0, 0x00, 0x80, 0x00, 0xc0, 0x00, 0xa0, 0x00, 0xc0, 0x00,
181 0xc0, 0x00, 0xc0, 0x00, 0xe0, 0x00, 0xc0, 0x20, 0x00, 0x00, 0xc0, 0x20, 0x20, 0x00, 0xc0, 0x20,
182 0x40, 0x00, 0xc0, 0x20, 0x60, 0x00, 0xc0, 0x20, 0x80, 0x00, 0xc0, 0x20, 0xa0, 0x00, 0xc0, 0x20,
183 0xc0, 0x00, 0xc0, 0x20, 0xe0, 0x00, 0xc0, 0x40, 0x00, 0x00, 0xc0, 0x40, 0x20, 0x00, 0xc0, 0x40,
184 0x40, 0x00, 0xc0, 0x40, 0x60, 0x00, 0xc0, 0x40, 0x80, 0x00, 0xc0, 0x40, 0xa0, 0x00, 0xc0, 0x40,
185 0xc0, 0x00, 0xc0, 0x40, 0xe0, 0x00, 0xc0, 0x60, 0x00, 0x00, 0xc0, 0x60, 0x20, 0x00, 0xc0, 0x60,
186 0x40, 0x00, 0xc0, 0x60, 0x60, 0x00, 0xc0, 0x60, 0x80, 0x00, 0xc0, 0x60, 0xa0, 0x00, 0xc0, 0x60,
187 0xc0, 0x00, 0xc0, 0x60, 0xe0, 0x00, 0xc0, 0x80, 0x00, 0x00, 0xc0, 0x80, 0x20, 0x00, 0xc0, 0x80,
188 0x40, 0x00, 0xc0, 0x80, 0x60, 0x00, 0xc0, 0x80, 0x80, 0x00, 0xc0, 0x80, 0xa0, 0x00, 0xc0, 0x80,
189 0xc0, 0x00, 0xc0, 0x80, 0xe0, 0x00, 0xc0, 0xa0, 0x00, 0x00, 0xc0, 0xa0, 0x20, 0x00, 0xc0, 0xa0,
190 0x40, 0x00, 0xc0, 0xa0, 0x60, 0x00, 0xc0, 0xa0, 0x80, 0x00, 0xc0, 0xa0, 0xa0, 0x00, 0xc0, 0xa0,
191 0xc0, 0x00, 0xc0, 0xa0, 0xe0, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0xc0, 0xc0, 0x20, 0x00, 0xc0, 0xc0,
192 0x40, 0x00, 0xc0, 0xc0, 0x60, 0x00, 0xc0, 0xc0, 0x80, 0x00, 0xc0, 0xc0, 0xa0, 0x00, 0xf0, 0xfb,
193 0xff, 0x00, 0xa4, 0xa0, 0xa0, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
194 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff,
195 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
196 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
197 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
198 0xff, 0xff, 0x00, 0x00, 0xf8, 0x00, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
199 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
200 0x00, 0x00, 0xf8, 0xf8, 0xec, 0x00, 0xec, 0x99, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
201 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
202 0xf8, 0xf8, 0xec, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff,
203 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8,
204 0xec, 0xec, 0xec, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, 0x00, 0xff,
205 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec,
206 0xec, 0xec, 0xec, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00,
207 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xec, 0xec,
208 0xec, 0xec, 0xec, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec,
209 0xec, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xeb, 0xec, 0xec, 0x09,
210 0xed, 0xec, 0xec, 0xeb, 0xec, 0x00, 0xec, 0xec, 0xeb, 0x09, 0x09, 0x08, 0x07, 0x09, 0xec, 0xec,
211 0xec, 0xec, 0x99, 0x00, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0xec, 0xec, 0x09, 0x00, 0xf6, 0xff,
212 0xf6, 0xf6, 0xed, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0x09, 0x00, 0xff, 0xff, 0xff, 0xf6, 0x07,
213 0xec, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0xec, 0x09, 0xff, 0xff, 0xff, 0xff,
214 0xff, 0xf6, 0x08, 0xec, 0xec, 0x00, 0xec, 0xec, 0x09, 0x00, 0xff, 0xf6, 0xf6, 0xff, 0xff, 0xf6,
215 0x08, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xeb, 0x09, 0xff, 0xff, 0xf6, 0x09, 0x09,
216 0x00, 0xff, 0xf6, 0xed, 0xec, 0x00, 0xec, 0xec, 0x09, 0xff, 0xf6, 0xf6, 0x07, 0x09, 0x00, 0xff,
217 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xf3, 0x00, 0xf6, 0x00, 0xeb, 0xeb, 0xec,
218 0x08, 0x00, 0xf6, 0xf5, 0xec, 0x00, 0xec, 0xec, 0x09, 0xff, 0xf6, 0xec, 0xec, 0xeb, 0xec, 0x00,
219 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0x09, 0x00, 0xf6, 0xed, 0xeb, 0xec, 0xec,
220 0x09, 0x00, 0xf6, 0x09, 0xec, 0x00, 0xec, 0xec, 0x00, 0xff, 0xf6, 0xec, 0xf3, 0x00, 0xbe, 0x00,
221 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0x08, 0xf6, 0xf6, 0xe4, 0xeb, 0xec, 0x09,
222 0x09, 0x00, 0xf6, 0xed, 0xec, 0x00, 0xec, 0xec, 0xf4, 0xff, 0xf6, 0xed, 0xf3, 0x00, 0xff, 0xff,
223 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0x08, 0xf6, 0xf6, 0xe4, 0xeb, 0xec, 0xec,
224 0xbe, 0xff, 0xf6, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0x00, 0xf6, 0x07, 0x09, 0xf5, 0xf6, 0xf6,
225 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0x08, 0xf6, 0xf6, 0xed, 0xec, 0xec, 0x09,
226 0x00, 0xf6, 0x09, 0xec, 0xec, 0x00, 0xec, 0xec, 0xeb, 0x09, 0xff, 0xf6, 0x09, 0xec, 0xec, 0xec,
227 0x09, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0x08, 0x00, 0xf6, 0xf6, 0x07, 0x08, 0xff,
228 0xff, 0x08, 0xec, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0xec, 0x08, 0xff, 0xf6, 0xf6, 0xf5, 0x09,
229 0x08, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xf4, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
230 0x08, 0xec, 0xeb, 0xec, 0x00, 0x00, 0x00, 0xec, 0xec, 0xec, 0x09, 0x08, 0x00, 0xff, 0xff, 0xff,
231 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0x09, 0x08, 0x00, 0xff, 0x08, 0x09,
232 0x09, 0xeb, 0x00, 0x00, 0xf8, 0xf8, 0x99, 0x00, 0x00, 0xec, 0xec, 0xec, 0xf5, 0x08, 0xff, 0xff,
233 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0xec, 0xec, 0x09, 0xeb, 0xec, 0xeb,
234 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, 0x00, 0xec, 0xeb, 0xec, 0x09, 0x09,
235 0xed, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0x00, 0x00,
236 0xf8, 0xf8, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, 0x00, 0xec, 0xec, 0xec,
237 0xec, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0xec, 0xec, 0x00, 0x00, 0xf8, 0xf8,
238 0xec, 0xeb, 0x00, 0xff, 0xff, 0xff, 0xf6, 0xec, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, 0x00, 0xec,
239 0xec, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec,
240 0xeb, 0x00, 0xf6, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00,
241 0x00, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xec, 0xec,
242 0xf4, 0xf6, 0xed, 0x00, 0xff, 0xf6, 0xff, 0xff, 0x00, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0x99,
243 0x99, 0x00, 0x00, 0x99, 0x00, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec,
244 0xf4, 0xf6, 0x09, 0xf6, 0xec, 0x00, 0xf6, 0xf4, 0xf6, 0xed, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec,
245 0xec, 0x99, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xec, 0xec,
246 0x09, 0x00, 0xed, 0x00, 0xee, 0x00, 0xf6, 0xeb, 0x00, 0xee, 0xec, 0xec, 0xec, 0xec, 0xec, 0x99,
247 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec,
248 0xeb, 0x00, 0xf6, 0x00, 0xff, 0xff, 0xf6, 0x00, 0x00, 0x00, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00,
249 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8,
250 0xec, 0x09, 0x00, 0xf6, 0xec, 0xec, 0xec, 0x00, 0xf6, 0xed, 0xec, 0x99, 0x99, 0x00, 0x00, 0xff,
251 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
252 0xf8, 0xf8, 0xeb, 0x00, 0xff, 0xff, 0xff, 0xf6, 0xed, 0x99, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff,
253 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
254 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
255 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
256 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
257 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
258 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
259 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
260 };
261
262
263 static const uint8_t icon16[630] = {
264 0x42, 0x4d, 0x76, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x28, 0x00,
265 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00,
266 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0x00, 0x00,
267 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80,
268 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80,
269 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
270 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff,
271 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff,
272 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x70, 0x60, 0x0f,
273 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x70, 0x76, 0x60,
274 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x77, 0x70, 0x77, 0x76,
275 0x60, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x77, 0x77, 0x70, 0x77, 0x77,
276 0x76, 0x60, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x77, 0x77, 0x77, 0x70, 0x77, 0x77,
277 0x77, 0x76, 0x60, 0x0f, 0xff, 0xff, 0xff, 0x00, 0x77, 0x77, 0x77, 0x77, 0x77, 0x70, 0x77, 0x77,
278 0x77, 0x77, 0x77, 0x70, 0x0f, 0xff, 0x00, 0x77, 0x77, 0x77, 0x78, 0x87, 0x77, 0x70, 0x77, 0x78,
279 0x88, 0x88, 0x77, 0x77, 0x60, 0x0f, 0x07, 0x77, 0x77, 0x80, 0xff, 0xff, 0x87, 0x70, 0x77, 0x78,
280 0x0f, 0xff, 0xf8, 0x77, 0x76, 0x0f, 0x07, 0x77, 0x78, 0xff, 0xff, 0xff, 0x87, 0x70, 0x77, 0x80,
281 0xff, 0xff, 0xff, 0x87, 0x76, 0x0f, 0x07, 0x77, 0x8f, 0xff, 0x88, 0x0f, 0xf8, 0x70, 0x77, 0x8f,
282 0xff, 0x88, 0x0f, 0xf8, 0x76, 0x0f, 0x07, 0x77, 0x0f, 0x07, 0x77, 0x80, 0xf8, 0x70, 0x77, 0x8f,
283 0xf7, 0x77, 0x70, 0xf8, 0x76, 0x0f, 0x07, 0x78, 0x0f, 0x87, 0x77, 0x80, 0xf8, 0x70, 0x77, 0x0f,
284 0xf7, 0x70, 0x80, 0xf8, 0x76, 0x0f, 0x07, 0x78, 0xff, 0x77, 0x78, 0x80, 0xf8, 0x70, 0x77, 0x8f,
285 0xf8, 0x70, 0xff, 0xf8, 0x76, 0x0f, 0x07, 0x78, 0xff, 0x77, 0x77, 0x8f, 0xf7, 0x70, 0x77, 0x70,
286 0xf8, 0x88, 0xff, 0xf8, 0x76, 0x0f, 0x07, 0x78, 0xff, 0x87, 0x78, 0x0f, 0x87, 0x70, 0x77, 0x78,
287 0xff, 0x87, 0x77, 0x88, 0x76, 0x0f, 0x07, 0x78, 0x0f, 0xf8, 0x8f, 0xf8, 0x77, 0x70, 0x77, 0x77,
288 0x8f, 0xff, 0x88, 0x87, 0x76, 0x0f, 0x07, 0x78, 0x0f, 0xff, 0xff, 0x87, 0x77, 0x00, 0x07, 0x77,
289 0x88, 0x0f, 0xff, 0xf8, 0x76, 0x0f, 0x07, 0x77, 0x88, 0x0f, 0x88, 0x87, 0x00, 0x77, 0x60, 0x07,
290 0x77, 0x88, 0xff, 0xf8, 0x76, 0x0f, 0x07, 0x77, 0x77, 0x87, 0x77, 0x00, 0x77, 0x77, 0x76, 0x60,
291 0x07, 0x77, 0x88, 0x87, 0x76, 0x0f, 0x07, 0x77, 0x77, 0x77, 0x00, 0x77, 0x77, 0x77, 0x77, 0x76,
292 0x60, 0x07, 0x77, 0x77, 0x76, 0x0f, 0x07, 0x77, 0x77, 0x00, 0x77, 0x77, 0x0f, 0xff, 0xf7, 0x77,
293 0x76, 0x60, 0x07, 0x77, 0x76, 0x0f, 0x07, 0x77, 0x00, 0x77, 0x77, 0x70, 0xf7, 0x77, 0x77, 0x77,
294 0x77, 0x76, 0x60, 0x07, 0x76, 0x0f, 0x07, 0x00, 0x77, 0x77, 0x77, 0x8f, 0x80, 0xff, 0xff, 0x07,
295 0x77, 0x77, 0x76, 0x60, 0x06, 0x0f, 0x00, 0x77, 0x77, 0x77, 0x77, 0x8f, 0x8f, 0x70, 0xf8, 0xf8,
296 0x77, 0x77, 0x77, 0x76, 0x60, 0x0f, 0xff, 0x00, 0x77, 0x77, 0x77, 0x80, 0x80, 0x80, 0xf7, 0x08,
297 0x77, 0x77, 0x76, 0x60, 0x0f, 0xff, 0xff, 0xff, 0x00, 0x77, 0x77, 0x70, 0xf0, 0xff, 0xf0, 0x00,
298 0x77, 0x76, 0x60, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x78, 0x0f, 0x77, 0x70, 0xf8,
299 0x76, 0x60, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x70, 0xff, 0xff, 0x86,
300 0x60, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x77, 0x76, 0x60,
301 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x60, 0x0f,
302 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff,
303 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
304 };
305
306 static const uint8_t icon2[190] = {
307 0x42, 0x4d, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x28, 0x00,
308 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
309 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0x00, 0x00,
310 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xfc,
311 0x7f, 0xff, 0xff, 0xf2, 0x1f, 0xff, 0xff, 0xce, 0x87, 0xff, 0xff, 0x3e, 0xe1, 0xff, 0xfc, 0xfe,
312 0xf8, 0x7f, 0xf3, 0xfe, 0xfe, 0x1f, 0xcf, 0xfe, 0xff, 0xe7, 0x3f, 0xfe, 0xff, 0xf1, 0x7e, 0xfe,
313 0xf7, 0xf9, 0x7f, 0xfe, 0xef, 0xf9, 0x7f, 0xde, 0xff, 0x79, 0x75, 0xee, 0xff, 0xb9, 0x77, 0xee,
314 0xde, 0xb9, 0x7f, 0xee, 0xfe, 0xf9, 0x7f, 0xfe, 0xef, 0xf9, 0x7f, 0xde, 0xff, 0xf9, 0x77, 0xfe,
315 0xff, 0xf9, 0x77, 0xfc, 0x7d, 0xf9, 0x7d, 0xf3, 0x1f, 0xf9, 0x7f, 0xcf, 0x87, 0xf9, 0x7f, 0x3f,
316 0xe1, 0xf9, 0x7c, 0xf7, 0xf8, 0x79, 0x73, 0xef, 0xfe, 0x19, 0x4f, 0xfb, 0xdf, 0x81, 0x3f, 0xfe,
317 0xff, 0xe1, 0xcf, 0xea, 0xdf, 0x87, 0xf3, 0xeb, 0x8e, 0x1f, 0xfc, 0xf7, 0xb8, 0x7f, 0xff, 0x3b,
318 0xe1, 0xff, 0xff, 0xcf, 0x87, 0xff, 0xff, 0xf3, 0x1f, 0xff, 0xff, 0xfc, 0x7f, 0xff
319 };
320
321
322
323
2/7
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
6 GATEXX_TEST_UNIT(BitmapImages)
324 {
325 { // 1-bit image
326
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 LocalMemStream stream(&icon2[0], sizeof(icon2));
327
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage loadedImage;
328
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(BitmapImages::load(loadedImage, stream));
329 }
330
331 { // 4-bit image
332
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 LocalMemStream stream(&icon16[0], sizeof(icon16));
333
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage loadedImage;
334
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(BitmapImages::load(loadedImage, stream));
335 }
336
337 { // 8-bit image
338
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 LocalMemStream stream(&icon256[0], sizeof(icon256));
339
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage loadedImage;
340
4/14
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
2 GATEXX_TEST_CHECK_NOTHROW(BitmapImages::load(loadedImage, stream));
341 }
342 2 }
343
344
2/7
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
6 GATEXX_TEST_UNIT(Drawer)
345 {
346 2 unsigned dim = 128;
347
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage image(dim, dim);
348
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 image.clear(Color::Blue);
349
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 Drawer d(image);
350
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 d.line(0, 0, dim - 1, dim - 1, Color::Yellow);
351
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 d.rectangle(0, 0, dim - 1, dim - 1, Color::Green);
352
353
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage imageSmall(dim / 3, dim / 3);
354
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 imageSmall.clear(Color::Red);
355
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 d.scaledImage(imageSmall);
356
357
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
4 RasterImage imageLarge(dim * 3, dim * 3);
358
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 imageLarge.clear(Color::Blue);
359
1/2
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
2 d.scaledImage(imageLarge);
360 2 }
361