diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-02-02 21:56:27 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-02-02 21:56:27 +0000 |
| commit | 1029bec7334fedbd8570cd8bfa5ddf954da8b3ec (patch) | |
| tree | bf1931328f5949eb78ed5cde5be6c7519e7688fc /test/image_test.cc | |
| parent | 308fb04d15cecb471c8c04db40d2979810efefe3 (diff) | |
A number of unit test fixes.
Diffstat (limited to 'test/image_test.cc')
| -rw-r--r-- | test/image_test.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/image_test.cc b/test/image_test.cc index 299ef2e51..7780c94cc 100644 --- a/test/image_test.cc +++ b/test/image_test.cc @@ -194,14 +194,14 @@ BOOST_AUTO_TEST_CASE (merge_test1) { int const stride = 48 * 4; - shared_ptr<Image> A (new Image (AV_PIX_FMT_RGBA, dcp::Size (48, 48), false)); + shared_ptr<Image> A (new Image (AV_PIX_FMT_BGRA, dcp::Size (48, 48), false)); A->make_transparent (); uint8_t* a = A->data()[0]; for (int y = 0; y < 48; ++y) { uint8_t* p = a + y * stride; for (int x = 0; x < 16; ++x) { - /* red */ + /* blue */ p[x * 4] = 255; /* opaque */ p[x * 4 + 3] = 255; @@ -219,21 +219,21 @@ BOOST_AUTO_TEST_CASE (merge_test1) /** Test merge (list<PositionImage>) with two images */ BOOST_AUTO_TEST_CASE (merge_test2) { - shared_ptr<Image> A (new Image (AV_PIX_FMT_RGBA, dcp::Size (48, 1), false)); + shared_ptr<Image> A (new Image (AV_PIX_FMT_BGRA, dcp::Size (48, 1), false)); A->make_transparent (); uint8_t* a = A->data()[0]; for (int x = 0; x < 16; ++x) { - /* red */ + /* blue */ a[x * 4] = 255; /* opaque */ a[x * 4 + 3] = 255; } - shared_ptr<Image> B (new Image (AV_PIX_FMT_RGBA, dcp::Size (48, 1), false)); + shared_ptr<Image> B (new Image (AV_PIX_FMT_BGRA, dcp::Size (48, 1), false)); B->make_transparent (); uint8_t* b = B->data()[0]; for (int x = 0; x < 16; ++x) { - /* blue */ + /* red */ b[(x + 32) * 4 + 2] = 255; /* opaque */ b[(x + 32) * 4 + 3] = 255; |
