148
148
TEST(FourCC, Stringification) {
149
149
fourcc_c big_f{big};
151
EXPECT_EQ(big_f.str(), "1234");
151
EXPECT_EQ("1234", big_f.str());
153
153
std::stringstream sstr;
154
154
EXPECT_NO_THROW(sstr << big_f);
155
EXPECT_EQ(sstr.str(), "1234");
157
EXPECT_EQ(fourcc_c{}.str(), "????");
158
EXPECT_EQ(fourcc_c{0x31003200}.str(), "1?2?");
155
EXPECT_EQ("1234", sstr.str());
157
EXPECT_EQ("????", fourcc_c{}.str());
158
EXPECT_EQ("1?2?", fourcc_c{0x31003200}.str());
161
TEST(FourCC, StringificationAsDescription) {
162
EXPECT_EQ("0x31323334 »1234«", fourcc_c{big}.description());
163
EXPECT_EQ("0x00000000 »????« (Uncompressed)", fourcc_c{}.description());
164
EXPECT_EQ("0x311732f8 »1?2?«", fourcc_c{0x311732f8}.description());
165
EXPECT_EQ("0x1f207e7f »? ~?«", fourcc_c{0x1f207e7f}.description());
167
EXPECT_EQ("0x63766964 »cvid« (Cinepak)", fourcc_c{"cvid"}.description());
168
EXPECT_EQ("0x78323634 »x264« (MPEG-4p10/AVC/h.264)", fourcc_c{"x264"}.description());
169
EXPECT_EQ("0x58323634 »X264« (MPEG-4p10/AVC/h.264)", fourcc_c{"X264"}.description());
171
EXPECT_EQ("0x00000000 »????« (Uncompressed)", fourcc_c{0x00000000u}.description());
161
174
TEST(FourCC, WritingToMemory) {