ref: 42d06a127695b85512dab7fbd7b61c6917dafaf0
parent: 08377f37f37d00d10d06de32cdddfb369b21cc4c
parent: 2d61c97bc745fdf5bb813e981efabde60be44b97
author: lyao2 <[email protected]>
date: Fri Jun 6 11:13:10 EDT 2014
Merge pull request #924 from ruil2/expand_pic_1 resolve unit test warnings
--- a/codec/build/iOS/enc/encDemo/encDemo.xcodeproj/project.pbxproj
+++ b/codec/build/iOS/enc/encDemo/encDemo.xcodeproj/project.pbxproj
@@ -35,13 +35,6 @@
remoteGlobalIDString = 4CE4431118B6FFA00017DF25;
remoteInfo = welsenc;
};
- FAFB4FE918BC8E7D00315438 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = FAFB4FE218BC8E7C00315438 /* welsenc.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = 4CE4432118B6FFA00017DF25;
- remoteInfo = welsencTests;
- };
FAFB4FF018BC8E8600315438 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FAFB4FEB18BC8E8600315438 /* common.xcodeproj */;
@@ -49,13 +42,6 @@
remoteGlobalIDString = 4CE443D518B722CD0017DF25;
remoteInfo = common;
};
- FAFB4FF218BC8E8600315438 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = FAFB4FEB18BC8E8600315438 /* common.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = 4CE443E518B722CD0017DF25;
- remoteInfo = commonTests;
- };
FAFB4FF918BC8E9A00315438 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FAFB4FF418BC8E9A00315438 /* processing.xcodeproj */;
@@ -63,13 +49,6 @@
remoteGlobalIDString = 4CE4443118B724B60017DF25;
remoteInfo = processing;
};
- FAFB4FFB18BC8E9A00315438 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = FAFB4FF418BC8E9A00315438 /* processing.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = 4CE4444118B724B60017DF25;
- remoteInfo = processingTests;
- };
FAFB4FFD18BC8EAA00315438 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FAFB4FEB18BC8E8600315438 /* common.xcodeproj */;
@@ -203,7 +182,6 @@
isa = PBXGroup;
children = (
FAFB4FE818BC8E7D00315438 /* libwelsenc.a */,
- FAFB4FEA18BC8E7D00315438 /* welsencTests.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -212,7 +190,6 @@
isa = PBXGroup;
children = (
FAFB4FF118BC8E8600315438 /* libcommon.a */,
- FAFB4FF318BC8E8600315438 /* commonTests.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -221,7 +198,6 @@
isa = PBXGroup;
children = (
FAFB4FFA18BC8E9A00315438 /* libprocessing.a */,
- FAFB4FFC18BC8E9A00315438 /* processingTests.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -325,13 +301,6 @@
remoteRef = FAFB4FE718BC8E7D00315438 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- FAFB4FEA18BC8E7D00315438 /* welsencTests.xctest */ = {
- isa = PBXReferenceProxy;
- fileType = wrapper.cfbundle;
- path = welsencTests.xctest;
- remoteRef = FAFB4FE918BC8E7D00315438 /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
FAFB4FF118BC8E8600315438 /* libcommon.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -339,25 +308,11 @@
remoteRef = FAFB4FF018BC8E8600315438 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- FAFB4FF318BC8E8600315438 /* commonTests.xctest */ = {
- isa = PBXReferenceProxy;
- fileType = wrapper.cfbundle;
- path = commonTests.xctest;
- remoteRef = FAFB4FF218BC8E8600315438 /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
FAFB4FFA18BC8E9A00315438 /* libprocessing.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libprocessing.a;
remoteRef = FAFB4FF918BC8E9A00315438 /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
- FAFB4FFC18BC8E9A00315438 /* processingTests.xctest */ = {
- isa = PBXReferenceProxy;
- fileType = wrapper.cfbundle;
- path = processingTests.xctest;
- remoteRef = FAFB4FFB18BC8E9A00315438 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
--- a/test/encoder/EncUT_MemoryAlloc.cpp
+++ b/test/encoder/EncUT_MemoryAlloc.cpp
@@ -18,11 +18,13 @@
TEST(MemoryAlignTest, GetCacheLineSize_Zero) {
CMemoryAlign cTestMa(0);
- ASSERT_EQ( 16, cTestMa.WelsGetCacheLineSize() );
+ const uint32_t kuiSixteen = 16;
+ ASSERT_EQ( kuiSixteen, cTestMa.WelsGetCacheLineSize() );
}
TEST(MemoryAlignTest, GetCacheLineSize_MaxUINT) {
CMemoryAlign cTestMa(0xFFFFFFFF);
- ASSERT_EQ( 16, cTestMa.WelsGetCacheLineSize() );
+ const uint32_t kuiSixteen = 16;
+ ASSERT_EQ( kuiSixteen, cTestMa.WelsGetCacheLineSize() );
}
//Tests of WelsGetCacheLineSize End
//Tests of WelsMallocAndFree Begin
@@ -29,7 +31,7 @@
TEST(MemoryAlignTest, WelsMallocAndFreeOnceFunctionVerify) {
const uint32_t kuiTargetAlignSize[4] = {32, 16, 64, 8};
srand((uint32_t)time(NULL));
-
+ const uint32_t kuiZero = 0;
for (int i=0; i<4; i++) {
const uint32_t kuiTestAlignSize = kuiTargetAlignSize[i];
const uint32_t kuiTestDataSize = abs(rand());
@@ -45,13 +47,13 @@
ASSERT_TRUE( (((uintptr_t)(pUnitTestData)) & kuiExtraAlignSize) == 0 );
EXPECT_EQ( kuiExpectedSize, cTestMa.WelsGetMemoryUsage() );
cTestMa.WelsFree( pUnitTestData, strUnitTestTag );
- EXPECT_EQ( 0, cTestMa.WelsGetMemoryUsage() );
+ EXPECT_EQ( kuiZero, cTestMa.WelsGetMemoryUsage() );
}
else {
EXPECT_EQ( NULL, pUnitTestData );
- EXPECT_EQ( 0, cTestMa.WelsGetMemoryUsage() );
+ EXPECT_EQ( kuiZero, cTestMa.WelsGetMemoryUsage() );
cTestMa.WelsFree( pUnitTestData, strUnitTestTag );
- EXPECT_EQ( 0, cTestMa.WelsGetMemoryUsage() );
+ EXPECT_EQ( kuiZero, cTestMa.WelsGetMemoryUsage() );
}
}
}