Makes gmock work on Symbian (both 3rd & 5th editions), original patch contributed by Mika Raento.
This commit is contained in:
@@ -192,6 +192,19 @@ class ElementsAreMatcher$i {
|
||||
typedef typename internal::StlContainerView<RawContainer>::type::value_type
|
||||
Element;
|
||||
|
||||
$if i==1 [[
|
||||
|
||||
// Nokia's Symbian Compiler has a nasty bug where the object put
|
||||
// in a one-element local array is not destructed when the array
|
||||
// goes out of scope. This leads to obvious badness as we've
|
||||
// added the linked_ptr in it to our other linked_ptrs list.
|
||||
// Hence we implement ElementsAreMatcher1 specially to avoid using
|
||||
// a local array.
|
||||
const Matcher<const Element&> matcher =
|
||||
MatcherCast<const Element&>(e1_);
|
||||
return MakeMatcher(new ElementsAreMatcherImpl<Container>(&matcher, 1));
|
||||
]] $else [[
|
||||
|
||||
const Matcher<const Element&> matchers[] = {
|
||||
|
||||
$for j [[
|
||||
@@ -201,6 +214,8 @@ $for j [[
|
||||
};
|
||||
|
||||
return MakeMatcher(new ElementsAreMatcherImpl<Container>(matchers, $i));
|
||||
]]
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user