I've been trying to figure out how to match a C-style array argument using ElementsAreArray but I haven't been having a lot of luck. I've read through Cookbook and all the posts I can find about ElementsAreArray but I'm still stumped.
/usr/local/include/gmock/gmock-matchers.h: In member function ‘testing::internal::ElementsAreArrayMatcher<T>::operator testing::Matcher<T>() const [with Container = const u32*, T = long unsigned int]’:
SitesActionHandlerTest.cpp:53: instantiated from here
/usr/local/include/gmock/gmock-matchers.h:2534: error: ‘const u32*’ is not a class, struct, or union type
/usr/local/include/gmock/gmock-matchers.h: At global scope:
/usr/local/include/gmock/gmock-matchers.h: In instantiation of ‘testing::internal::ElementsAreMatcherImpl<const u32*>’:
/usr/local/include/gmock/gmock-matchers.h:2536: instantiated from ‘testing::internal::ElementsAreArrayMatcher<T>::operator testing::Matcher<T>() const [with Container = const u32*, T = long unsigned int]’
SitesActionHandlerTest.cpp:53: instantiated from here
/usr/local/include/gmock/gmock-matchers.h:2399: error: ‘const u32*’ is not a class, struct, or union type
/usr/local/include/gmock/gmock-matchers.h:2502: error: ‘const u32*’ is not a class, struct, or union type
/usr/local/include/gmock/gmock-matchers.h: In constructor ‘testing::internal::ElementsAreMatcherImpl<Container>::ElementsAreMatcherImpl(InputIter, size_t) [with InputIter = const long unsigned int*, Container = const u32*]’:
/usr/local/include/gmock/gmock-matchers.h:2536: instantiated from ‘testing::internal::ElementsAreArrayMatcher<T>::operator testing::Matcher<T>() const [with Container = const u32*, T = long unsigned int]’
SitesActionHandlerTest.cpp:53: instantiated from here
/usr/local/include/gmock/gmock-matchers.h:2405: error: using invalid field ‘testing::internal::ElementsAreMatcherImpl<Container>::matchers_’
/usr/local/include/gmock/gmock-matchers.h:2408: error: using invalid field ‘testing::internal::ElementsAreMatcherImpl<Container>::matchers_’
/usr/local/include/gmock/gmock-matchers.h:2408: error: ‘const u32*’ is not a class, struct, or union type
/usr/local/include/gmock/gmock-actions.h: In constructor ‘testing::internal::ReturnAction<R>::Impl<F>::Impl(R) [with F = zios::web::ActionResult* ()(const u32*, int), R = int]’:
/usr/local/include/gmock/gmock-actions.h:472: instantiated from ‘testing::internal::ReturnAction<R>::operator testing::Action<Func>() const [with F = zios::web::ActionResult* ()(const u32*, int), R = int]’
SitesActionHandlerTest.cpp:53: instantiated from here
/usr/local/include/gmock/gmock-actions.h:491: error: no matching function for call to ‘ImplicitCast_(int&)’
/usr/local/include/gmock/gmock-matchers.h: In member function ‘bool testing::internal::ElementsAreMatcherImpl<Container>::MatchAndExplain(Container, testing::MatchResultListener*) const [with Container = const u32*]’:
SitesActionHandlerTest.cpp:73: instantiated from here
/usr/local/include/gmock/gmock-matchers.h:2451: error: request for member ‘size’ in ‘stl_container’, which is of non-class type ‘const u32* const’
SitesActionHandlerTest.cpp:73: instantiated from here
/usr/local/include/gmock/gmock-matchers.h:2463: error: ‘const u32*’ is not a class, struct, or union type
SitesActionHandlerTest.cpp:73: instantiated from here
/usr/local/include/gmock/gmock-matchers.h:2463: error: ‘const u32*’ is not a class, struct, or union type
/usr/local/include/gmock/gmock-matchers.h:2468: error: using invalid field ‘testing::internal::ElementsAreMatcherImpl<Container>::matchers_’
/usr/local/include/gmock/gmock-matchers.h:2463: error: ‘const u32*’ is not a class, struct, or union type
/usr/local/include/gmock/gmock-matchers.h: In member function ‘void testing::internal::ElementsAreMatcherImpl<Container>::DescribeTo(std::ostream*) const [with Container = const u32*]’:
SitesActionHandlerTest.cpp:73: instantiated from here
/usr/local/include/gmock/gmock-matchers.h:2418: error: using invalid field ‘testing::internal::ElementsAreMatcherImpl<Container>::matchers_’
SitesActionHandlerTest.cpp:73: instantiated from here
/usr/local/include/gmock/gmock-matchers.h:2423: error: using invalid field ‘testing::internal::ElementsAreMatcherImpl<Container>::matchers_’
/usr/local/include/gmock/gmock-matchers.h: In member function ‘void testing::internal::ElementsAreMatcherImpl<Container>::DescribeNegationTo(std::ostream*) const [with Container = const u32*]’:
SitesActionHandlerTest.cpp:73: instantiated from here
/usr/local/include/gmock/gmock-matchers.h:2441: error: using invalid field ‘testing::internal::ElementsAreMatcherImpl<Container>::matchers_’
/usr/local/include/gmock/gmock-matchers.h: In member function ‘size_t testing::internal::ElementsAreMatcherImpl<Container>::count() const [with Container = const u32*]’:
/usr/local/include/gmock/gmock-matchers.h:2452: instantiated from ‘bool testing::internal::ElementsAreMatcherImpl<Container>::MatchAndExplain(Container, testing::MatchResultListener*) const [with Container = const u32*]’
SitesActionHandlerTest.cpp:73: instantiated from here
/usr/local/include/gmock/gmock-matchers.h:2501: error: using invalid field ‘testing::internal::ElementsAreMatcherImpl<Container>::matchers_’
make: *** [Debug/SitesActionHandlerTest.o] Error 1