KiCad PCB EDA Suite
|
Test suite for BITMAP_BASE. More...
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <bitmap_base.h>
#include "wximage_test_utils.h"
#include <wx/mstream.h>
Go to the source code of this file.
Classes | |
class | TEST_BITMAP_BASE_FIXTURE |
struct | TEST_PIXEL_CASE |
Functions | |
BOOST_AUTO_TEST_CASE (Empty) | |
Declare the test suite. | |
BOOST_AUTO_TEST_CASE (EmptyCopy) | |
Check we can validly copy an empty bitmap. | |
BOOST_AUTO_TEST_CASE (BasicProps) | |
Check basic properties of the populated images. | |
BOOST_AUTO_TEST_CASE (BasicImage) | |
Check the image is right. | |
BOOST_AUTO_TEST_CASE (RotateImage) | |
Check the image is right after rotating. | |
BOOST_AUTO_TEST_CASE (MirrorImage) | |
Check the image is right after mirroring. | |
Variables | |
static const std::vector< unsigned char > | png_data_4tile |
4tile is an 8x8 image | |
static const VECTOR2I | size_4tile { 8, 8 } |
static const KIGFX::COLOR4D | col_red { 1.0, 0.0, 0.0, 1.0 } |
static const KIGFX::COLOR4D | col_green { 0.0, 1.0, 0.0, 1.0 } |
static const KIGFX::COLOR4D | col_blue { 0.0, 0.0, 1.0, 1.0 } |
static const KIGFX::COLOR4D | col_black { 0.0, 0.0, 0.0, 1.0 } |
Test suite for BITMAP_BASE.
Definition in file test_bitmap_base.cpp.
BOOST_AUTO_TEST_CASE | ( | BasicImage | ) |
Check the image is right.
Definition at line 173 of file test_bitmap_base.cpp.
References col_black, col_blue, col_green, col_red, and KI_TEST::IsImagePixelOfColor().
BOOST_AUTO_TEST_CASE | ( | BasicProps | ) |
Check basic properties of the populated images.
Definition at line 145 of file test_bitmap_base.cpp.
References BITMAP_BASE::GetBoundingBox(), BOX2< Vec >::GetEnd(), BITMAP_BASE::GetImageData(), BITMAP_BASE::GetPixelSizeIu(), BOX2< Vec >::GetPosition(), BITMAP_BASE::GetPPI(), BITMAP_BASE::GetScale(), BITMAP_BASE::GetSize(), BITMAP_BASE::GetSizePixels(), and size_4tile.
BOOST_AUTO_TEST_CASE | ( | Empty | ) |
Declare the test suite.
Check basic properties of a populated image
Definition at line 103 of file test_bitmap_base.cpp.
References empty(), BITMAP_BASE::GetImageData(), BITMAP_BASE::GetPixelSizeIu(), BITMAP_BASE::GetPPI(), BITMAP_BASE::GetScale(), and TOP_BOTTOM.
BOOST_AUTO_TEST_CASE | ( | EmptyCopy | ) |
Check we can validly copy an empty bitmap.
Definition at line 124 of file test_bitmap_base.cpp.
References empty(), and BITMAP_BASE::GetImageData().
BOOST_AUTO_TEST_CASE | ( | MirrorImage | ) |
Check the image is right after mirroring.
Definition at line 224 of file test_bitmap_base.cpp.
References col_black, col_blue, col_green, col_red, KI_TEST::IsImagePixelOfColor(), and TOP_BOTTOM.
BOOST_AUTO_TEST_CASE | ( | RotateImage | ) |
Check the image is right after rotating.
Definition at line 197 of file test_bitmap_base.cpp.
References col_black, col_blue, col_green, col_red, and KI_TEST::IsImagePixelOfColor().
|
static |
Definition at line 66 of file test_bitmap_base.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 65 of file test_bitmap_base.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 64 of file test_bitmap_base.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 63 of file test_bitmap_base.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
4tile is an 8x8 image
Definition at line 44 of file test_bitmap_base.cpp.
Referenced by TEST_BITMAP_BASE_FIXTURE::TEST_BITMAP_BASE_FIXTURE().
|
static |
Definition at line 61 of file test_bitmap_base.cpp.
Referenced by BOOST_AUTO_TEST_CASE().