Minor update that fixes crash in system wrappers unittest. (the crash was in the test of map_wrapper).
Review URL: http://webrtc-codereview.appspot.com/45007 git-svn-id: http://webrtc.googlecode.com/svn/trunk@124 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
0d7e5bc712
commit
d4d27675a8
@ -210,6 +210,8 @@ TEST_F(MapWrapperTest, CopyTest) {
|
|||||||
ASSERT_TRUE(CreateAscendingMap(&compare_map));
|
ASSERT_TRUE(CreateAscendingMap(&compare_map));
|
||||||
const int map_size = compare_map.Size();
|
const int map_size = compare_map.Size();
|
||||||
ASSERT_EQ(ascending_map_.Size(), map_size);
|
ASSERT_EQ(ascending_map_.Size(), map_size);
|
||||||
|
// CompareMaps compare the pointers not value of the pointers.
|
||||||
|
// (the values are the same since both are ascending maps).
|
||||||
EXPECT_FALSE(CompareMaps(compare_map,ascending_map_));
|
EXPECT_FALSE(CompareMaps(compare_map,ascending_map_));
|
||||||
|
|
||||||
int copy_count = 0;
|
int copy_count = 0;
|
||||||
@ -217,7 +219,7 @@ TEST_F(MapWrapperTest, CopyTest) {
|
|||||||
while (ascend_item != NULL) {
|
while (ascend_item != NULL) {
|
||||||
MapItem* compare_item = compare_map.Find(ascend_item->GetId());
|
MapItem* compare_item = compare_map.Find(ascend_item->GetId());
|
||||||
ASSERT_FALSE(compare_item == NULL);
|
ASSERT_FALSE(compare_item == NULL);
|
||||||
DeleteItemContent(ascend_item);
|
DeleteItemContent(compare_item);
|
||||||
compare_item->SetItem(ascend_item->GetItem());
|
compare_item->SetItem(ascend_item->GetItem());
|
||||||
ascend_item = ascending_map_.Next(ascend_item);
|
ascend_item = ascending_map_.Next(ascend_item);
|
||||||
++copy_count;
|
++copy_count;
|
||||||
|
Loading…
Reference in New Issue
Block a user