History

Add EncoderMB UT test file, and reformat UT files.

ganyang committed 12 years ago

Commit eb6f6ec1 parent 20c04648 files · +218 −29Browse files

Showing the changes to test/encoder/EncUT_MemoryAlloc.cpp (1 of 8 files). Show all

Unified · Split

test/encoder/EncUT_MemoryAlloc.cpp+4−10
@@ -6,8 +6,7 @@ · 5 unmodified lines
6using namespace WelsSVCEnc;6using namespace WelsSVCEnc;
7 7
8//Tests of WelsGetCacheLineSize Begin8//Tests of WelsGetCacheLineSize Begin
9TEST(MemoryAlignTest, GetCacheLineSize_LoopWithin16K)9TEST(MemoryAlignTest, GetCacheLineSize_LoopWithin16K) {
10{
11 const unsigned int kuiTestBoundary16K = 16 * 1024;10 const unsigned int kuiTestBoundary16K = 16 * 1024;
12 unsigned int uiTargetAlign = 1;11 unsigned int uiTargetAlign = 1;
13 while (uiTargetAlign < kuiTestBoundary16K) {12 while (uiTargetAlign < kuiTestBoundary16K) {
@@ -17,20 +16,17 @@ TEST(MemoryAlignTest, GetCacheLineSize_LoopWithin16K) · 3 unmodified lines
17 }16 }
18}17}
19 18
20TEST(MemoryAlignTest, GetCacheLineSize_Zero)19TEST(MemoryAlignTest, GetCacheLineSize_Zero) {
21{
22 CMemoryAlign cTestMa(0);20 CMemoryAlign cTestMa(0);
23 ASSERT_EQ( 16, cTestMa.WelsGetCacheLineSize() );21 ASSERT_EQ( 16, cTestMa.WelsGetCacheLineSize() );
24}22}
25TEST(MemoryAlignTest, GetCacheLineSize_MaxUINT)23TEST(MemoryAlignTest, GetCacheLineSize_MaxUINT) {
26{
27 CMemoryAlign cTestMa(0xFFFFFFFF);24 CMemoryAlign cTestMa(0xFFFFFFFF);
28 ASSERT_EQ( 16, cTestMa.WelsGetCacheLineSize() );25 ASSERT_EQ( 16, cTestMa.WelsGetCacheLineSize() );
29}26}
30//Tests of WelsGetCacheLineSize End27//Tests of WelsGetCacheLineSize End
31//Tests of WelsMallocAndFree Begin28//Tests of WelsMallocAndFree Begin
32TEST(MemoryAlignTest, WelsMallocAndFreeOnceFunctionVerify)29TEST(MemoryAlignTest, WelsMallocAndFreeOnceFunctionVerify) {
33{
34 const uint32_t kuiTargetAlignSize[4] = {32, 16, 64, 8};30 const uint32_t kuiTargetAlignSize[4] = {32, 16, 64, 8};
35 srand((uint32_t)time(NULL));31 srand((uint32_t)time(NULL));
36 32
@@ -59,5 +55,3 @@ TEST(MemoryAlignTest, WelsMallocAndFreeOnceFunctionVerify) · 22 unmodified lines
59 }55 }
60 }56 }
61}57}
62
63

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t