2 #include <gtest/gtest.h>
12 typedef ::testing::Types<u_int16_t, u_int32_t, u_int64_t>
TestTypes;
17 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getImgCount());
18 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getVideoCount());
19 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getSoundCount());
25 TestFixture::multiMediaCounters.addMultimedia(1, 127);
27 EXPECT_EQ(1U, TestFixture::multiMediaCounters.getImgCount());
28 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getVideoCount());
29 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getSoundCount());
35 TestFixture::multiMediaCounters.addMultimedia(1, 256);
37 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getImgCount());
38 EXPECT_EQ(1U, TestFixture::multiMediaCounters.getVideoCount());
39 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getSoundCount());
45 TestFixture::multiMediaCounters.addMultimedia(1, 512);
47 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getImgCount());
48 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getVideoCount());
49 EXPECT_EQ(1U, TestFixture::multiMediaCounters.getSoundCount());
55 TestFixture::multiMediaCounters.addMultimedia(1, 256 + 512);
57 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getImgCount());
58 EXPECT_EQ(1U, TestFixture::multiMediaCounters.getVideoCount());
59 EXPECT_EQ(1U, TestFixture::multiMediaCounters.getSoundCount());
65 TestFixture::multiMediaCounters.addMultimedia(1, 256 + 512);
66 TestFixture::multiMediaCounters.addMultimedia(1, 255 + 256 + 512);
68 EXPECT_EQ(1U, TestFixture::multiMediaCounters.getImgCount());
69 EXPECT_EQ(1U, TestFixture::multiMediaCounters.getVideoCount());
70 EXPECT_EQ(1U, TestFixture::multiMediaCounters.getSoundCount());
76 TestFixture::multiMediaCounters.addMultimedia(1, 32);
77 TestFixture::multiMediaCounters.addMultimedia(2, 32 + 256 + 512);
78 TestFixture::multiMediaCounters.addMultimedia(3, 512);
79 TestFixture::multiMediaCounters.addMultimedia(4, 32 + 512);
81 EXPECT_EQ(3U, TestFixture::multiMediaCounters.getImgCount());
82 EXPECT_EQ(1U, TestFixture::multiMediaCounters.getVideoCount());
83 EXPECT_EQ(3U, TestFixture::multiMediaCounters.getSoundCount());
89 TestFixture::multiMediaCounters.addMultimedia(1, 32 + 256 + 512);
90 TestFixture::multiMediaCounters.delMultimedia(1);
92 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getImgCount());
93 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getVideoCount());
94 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getSoundCount());
100 TestFixture::multiMediaCounters.addMultimedia(1, 32);
101 TestFixture::multiMediaCounters.addMultimedia(2, 32 + 256 + 512);
102 TestFixture::multiMediaCounters.addMultimedia(3, 512);
103 TestFixture::multiMediaCounters.addMultimedia(4, 32 + 512);
104 TestFixture::multiMediaCounters.delMultimedia(2);
105 TestFixture::multiMediaCounters.delMultimedia(3);
107 EXPECT_EQ(2U, TestFixture::multiMediaCounters.getImgCount());
108 EXPECT_EQ(0U, TestFixture::multiMediaCounters.getVideoCount());
109 EXPECT_EQ(1U, TestFixture::multiMediaCounters.getSoundCount());