QList<DomainObjects::Fault> faults;
createFault(faults);
EXPECT_CALL(*mockService, readBitEncodedFaults(_,_)).WillOnce(SetArgReferee<1>(faults)) .WillOnce(Return(DomainObjects::ErrorStatus::None));
Syntax:
MOCK_METHOD2(readBitEncodedFaults, DomainObjects::CommsError(QList<DomainObjects::Fault>&, QList<DomainObjects::Fault>));
gmock-more-actions.h(175) : error C2118: negative subscript
C:\ScanTool\CheckII_latest\gmock\include\gmock/gmock-generated-actions.h(664) : see reference to function template instantiation 'DomainObjects::CommsError testing::SetArgRefereeActionP<k,value_type>::gmock_Impl<F>::gmock_PerformImpl<A0,A1,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg>(const std::tuple<<unnamed-symbol>,_V0_t> &,arg0_type,arg1_type,arg2_type,arg3_type,arg4_type,arg5_type,arg6_type,arg7_type,arg8_type,arg9_type) const' being compiled
with
[
k=1,
value_type=QList<DomainObjects::Fault> *,
F=DomainObjects::CommsError (QList<DomainObjects::Fault> &,QList<DomainObjects::Fault>),
A0=QList<DomainObjects::Fault> &,
A1=QList<DomainObjects::Fault>,
<unnamed-symbol>=QList<DomainObjects::Fault> &,
_V0_t=QList<DomainObjects::Fault>,
arg0_type=QList<DomainObjects::Fault> &,
arg1_type=QList<DomainObjects::Fault>,
arg2_type=testing::internal::ExcessiveArg,
arg3_type=testing::internal::ExcessiveArg,
arg4_type=testing::internal::ExcessiveArg,
arg5_type=testing::internal::ExcessiveArg,
arg6_type=testing::internal::ExcessiveArg,
arg7_type=testing::internal::ExcessiveArg,
arg8_type=testing::internal::ExcessiveArg,
arg9_type=testing::internal::ExcessiveArg
]
C:\ScanTool\CheckII_latest\gmock\include\gmock/gmock-generated-actions.h(664) : see reference to function template instantiation 'DomainObjects::CommsError testing::SetArgRefereeActionP<k,value_type>::gmock_Impl<F>::gmock_PerformImpl<A0,A1,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg,testing::internal::ExcessiveArg>(const std::tuple<<unnamed-symbol>,_V0_t> &,arg0_type,arg1_type,arg2_type,arg3_type,arg4_type,arg5_type,arg6_type,arg7_type,arg8_type,arg9_type) const' being compiled
with
[
k=1,
value_type=QList<DomainObjects::Fault> *,
F=DomainObjects::CommsError (QList<DomainObjects::Fault> &,QList<DomainObjects::Fault>),
A0=QList<DomainObjects::Fault> &,
A1=QList<DomainObjects::Fault>,
<unnamed-symbol>=QList<DomainObjects::Fault> &,
_V0_t=QList<DomainObjects::Fault>,
arg0_type=QList<DomainObjects::Fault> &,
arg1_type=QList<DomainObjects::Fault>,
arg2_type=testing::internal::ExcessiveArg,
arg3_type=testing::internal::ExcessiveArg,
arg4_type=testing::internal::ExcessiveArg,
arg5_type=testing::internal::ExcessiveArg,
arg6_type=testing::internal::ExcessiveArg,
arg7_type=testing::internal::ExcessiveArg,
arg8_type=testing::internal::ExcessiveArg,
arg9_type=testing::internal::ExcessiveArg
]
C:\ScanTool\CheckII_latest\gmock\include\gmock/gmock-more-actions.h(170) : see reference to function template instantiation 'Result testing::internal::ActionHelper<Result,Impl>::Perform<A1,A2>(Impl *,const std::tuple<<unnamed-symbol>,_V0_t> &)' being compiled
with
[
Result=DomainObjects::CommsError,
Impl=testing::SetArgRefereeActionP<1,QList<DomainObjects::Fault> *>::gmock_Impl<DomainObjects::CommsError (QList<DomainObjects::Fault> &,QList<DomainObjects::Fault>)>,
A1=QList<DomainObjects::Fault> &,
A2=QList<DomainObjects::Fault>,
<unnamed-symbol>=QList<DomainObjects::Fault> &,
_V0_t=QList<DomainObjects::Fault>
]
C:\ScanTool\CheckII_latest\gmock\include\gmock/gmock-more-actions.h(170) : see reference to function template instantiation 'Result testing::internal::ActionHelper<Result,Impl>::Perform<A1,A2>(Impl *,const std::tuple<<unnamed-symbol>,_V0_t> &)' being compiled
with
[
Result=DomainObjects::CommsError,
Impl=testing::SetArgRefereeActionP<1,QList<DomainObjects::Fault> *>::gmock_Impl<DomainObjects::CommsError (QList<DomainObjects::Fault> &,QList<DomainObjects::Fault>)>,
A1=QList<DomainObjects::Fault> &,
A2=QList<DomainObjects::Fault>,
<unnamed-symbol>=QList<DomainObjects::Fault> &,
_V0_t=QList<DomainObjects::Fault>
]
C:\ScanTool\CheckII_latest\gmock\include\gmock/gmock-more-actions.h(170) : while compiling class template member function 'DomainObjects::CommsError testing::SetArgRefereeActionP<k,value_type>::gmock_Impl<F>::Perform(const std::tuple<<unnamed-symbol>,_V0_t> &)'
with
[
k=1,
value_type=QList<DomainObjects::Fault> *,
F=DomainObjects::CommsError (QList<DomainObjects::Fault> &,QList<DomainObjects::Fault>),
<unnamed-symbol>=QList<DomainObjects::Fault> &,
_V0_t=QList<DomainObjects::Fault>
]
C:\ScanTool\CheckII_latest\gmock\include\gmock/gmock-more-actions.h(170) : see reference to class template instantiation 'testing::SetArgRefereeActionP<k,value_type>::gmock_Impl<F>' being compiled
with
[
k=1,
value_type=QList<DomainObjects::Fault> *,
F=DomainObjects::CommsError (QList<DomainObjects::Fault> &,QList<DomainObjects::Fault>)
]
..\..\..\ScanTool\CheckII_latest\ApplicationLayerTests\Faultcodemodelh8tests.cpp(39) : see reference to function template instantiation 'testing::SetArgRefereeActionP<k,value_type>::operator testing::Action<F>(void) const<F>' being compiled
with
[
k=1,
value_type=QList<DomainObjects::Fault> *,
F=DomainObjects::CommsError (QList<DomainObjects::Fault> &,QList<DomainObjects::Fault>)
]
..\..\..\ScanTool\CheckII_latest\ApplicationLayerTests\Faultcodemodelh8tests.cpp(40) : see reference to function template instantiation 'testing::SetArgRefereeActionP<k,value_type>::operator testing::Action<F>(void) const<F>' being compiled
with
[
k=1,
value_type=QList<DomainObjects::Fault> *,
F=DomainObjects::CommsError (QList<DomainObjects::Fault> &,QList<DomainObjects::Fault>)
]
C:\ScanTool\CheckII_latest\gmock\include\gmock/gmock-more-actions.h(177) : error C2678: binary '=' : no operator found which takes a left-hand operand of type 'const QList<T>' (or there is no acceptable conversion)
with
[
T=DomainObjects::Fault
]
c:\qt\qt5.2.1\5.2.1\msvc2012_64\include\qtcore\qlist.h(117): could be 'QList<T> &QList<T>::operator =(const QList<T> &)'
with
[
T=DomainObjects::Fault
]
c:\qt\qt5.2.1\5.2.1\msvc2012_64\include\qtcore\qlist.h(120): or 'QList<T> &QList<T>::operator =(QList<T> &&)'
with
[
T=DomainObjects::Fault
]
while trying to match the argument list '(const QList<T>, QList<T> )'
with
[
T=DomainObjects::Fault
]