-
Committer:
Tarmac
-
Author(s):
Sam Spilsbury, Andrea Azzarone
-
Date:
2013-06-05 18:00:00 UTC
-
mfrom:
(3733.1.2 compiz.fix_1187168)
-
Revision ID:
tarmac-20130605180000-b1pm7m2ty5e07gde
Satisfy matchers on getProperty as soon as they are set.
The order of evaluation for matchers in Google Mock appears to be
undefined - this means that we can't rely on the first argument being
matched first and the second argument being matched afterwards. In turn,
this means that any GValue may be passed to a GValueMatch which, by a
design flaw, is unable to handle any values of a type it does not expect
(at least not without an API change). It will silently pass the incorrect
type to g_type_get_* which causes internal assertion failures.
At the moment we're just interleaving the calls to getProperty and
get_property - that way the expectations are satisfied and go away
as soon as they're set. This in turn means that Google Mock only
has to traverse one matcher rather than multiple matchers.
(LP: #1187468). Fixes: https://bugs.launchpad.net/bugs/1187468.
Approved by PS Jenkins bot, Andrea Azzarone.