Skip to content

Commit c79ded2

Browse files
committed
Add test for image only constructor
- Some tests are commented out; behavior is strange / unexpected / inconsistent at times; this probably needs to be fixed, thus do not capture it in test for now.
1 parent 3edda09 commit c79ded2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/Frame_Tests.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,21 @@ TEST(Default_Constructor)
5757
CHECK_EQUAL(false, f1.has_audio_data);
5858
}
5959

60+
TEST(ImageOnly_Constructor)
61+
{
62+
Frame f(42, 100, 111, "#FAFBFC");
63+
64+
CHECK_EQUAL(100, f.GetWidth());
65+
CHECK_EQUAL(111, f.GetHeight());
66+
CHECK_EQUAL(44100, f.SampleRate());
67+
CHECK_EQUAL(2, f.GetAudioChannelsCount());
68+
69+
CHECK_EQUAL(false, f.has_audio_data);
70+
// CHECK_EQUAL(true, f.has_image_data); // TODO: This would be expected?
71+
// CHECK(f.GetPixels(0)); // TODO: crashes
72+
// CHECK(f.CheckPixel(0, 0, 0xFA, 0xFB, 0xFC, 0, 0));
73+
}
74+
6075
TEST(GetImage)
6176
{
6277
Frame f1;

0 commit comments

Comments
 (0)