Skip to content

Commit 08a18e1

Browse files
committed
Core (Tests): Add test for BMP image loading.
1 parent 8dc42f2 commit 08a18e1

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed
5.64 KB
Binary file not shown.
47.8 KB
Binary file not shown.

libvisual/tests/video_test/video_load_test.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ namespace
9191

9292
void test_load_indexed8 ()
9393
{
94+
auto bmp_image {LV::Video::create_from_file ("../images/additive-colors-indexed8.bmp")};
95+
LV_TEST_ASSERT (bmp_image);
96+
9497
auto png_image {LV::Video::create_from_file ("../images/additive-colors-indexed8.png")};
9598
LV_TEST_ASSERT (png_image);
9699

@@ -102,11 +105,15 @@ namespace
102105
auto raw_image_rgb24 {LV::Video::create (raw_image->get_width (), raw_image->get_height (), VISUAL_VIDEO_DEPTH_24BIT)};
103106
raw_image_rgb24->convert_depth (raw_image);
104107

108+
LV_TEST_ASSERT (bmp_image->has_same_content (raw_image));
105109
LV_TEST_ASSERT (png_image->has_same_content (raw_image_rgb24));
106110
}
107111

108112
void test_load_rgb24 ()
109113
{
114+
auto bmp_image {LV::Video::create_from_file ("../images/additive-colors-rgb24.bmp")};
115+
LV_TEST_ASSERT (bmp_image);
116+
110117
auto png_image {LV::Video::create_from_file ("../images/additive-colors-rgb24.png")};
111118
LV_TEST_ASSERT (png_image);
112119

@@ -115,6 +122,7 @@ namespace
115122
png_image->get_height (),
116123
VISUAL_VIDEO_DEPTH_24BIT)};
117124

125+
LV_TEST_ASSERT (bmp_image->has_same_content (raw_image));
118126
LV_TEST_ASSERT (png_image->has_same_content (raw_image));
119127
}
120128

0 commit comments

Comments
 (0)