@@ -240,10 +240,10 @@ struct ReferenceTypesTests: tpunit::TestFixture {
240240 ConcreteType concrete{" myConcreteType" };
241241
242242 // explicit copy here
243- When (Method (mock, returnStringByConstRef)).ReturnCapture (aString);
244- When (Method (mock, returnStringByRValRef)).ReturnCapture (bString);
245- When (Method (mock, returnIntByRef)).ReturnCapture (num);
246- When (Method (mock, returnAbstractTypeByRef)).ReturnCapture (concrete);
243+ When (Method (mock, returnStringByConstRef)).ReturnValCapt (aString);
244+ When (Method (mock, returnStringByRValRef)).ReturnValCapt (bString);
245+ When (Method (mock, returnIntByRef)).ReturnValCapt (num);
246+ When (Method (mock, returnAbstractTypeByRef)).ReturnValCapt (concrete);
247247
248248 // modify now so know whether or not is was copied
249249 aString = " modified" ;
@@ -276,13 +276,13 @@ struct ReferenceTypesTests: tpunit::TestFixture {
276276 ConcreteType concrete{" myConcreteType" };
277277
278278 // explicit move here
279- When (Method (mock, returnStringByConstRef)).ReturnCapture (std::move (aString));
280- When (Method (mock, returnStringByRef)).ReturnCapture (std::move (bString));
281- When (Method (mock, returnStringByRValRef)).ReturnCapture (std::move (cString));
282- When (Method (mock, returnMoveOnlyByConstRef)).ReturnCapture (std::move (aPtrString));
283- When (Method (mock, returnMoveOnlyByRef)).ReturnCapture (std::move (bPtrString));
284- When (Method (mock, returnMoveOnlyByRValRef)).ReturnCapture (std::move (cPtrString));
285- When (Method (mock, returnAbstractTypeByRef)).ReturnCapture (std::move (concrete));
279+ When (Method (mock, returnStringByConstRef)).ReturnValCapt (std::move (aString));
280+ When (Method (mock, returnStringByRef)).ReturnValCapt (std::move (bString));
281+ When (Method (mock, returnStringByRValRef)).ReturnValCapt (std::move (cString));
282+ When (Method (mock, returnMoveOnlyByConstRef)).ReturnValCapt (std::move (aPtrString));
283+ When (Method (mock, returnMoveOnlyByRef)).ReturnValCapt (std::move (bPtrString));
284+ When (Method (mock, returnMoveOnlyByRValRef)).ReturnValCapt (std::move (cPtrString));
285+ When (Method (mock, returnAbstractTypeByRef)).ReturnValCapt (std::move (concrete));
286286
287287 // Verify objects were moved.
288288 EXPECT_TRUE (aString.empty ());
@@ -311,13 +311,13 @@ struct ReferenceTypesTests: tpunit::TestFixture {
311311 Mock<ReferenceInterface> mock;
312312
313313 {
314- When (Method (mock, returnStringByConstRef)).ReturnCapture (std::string{" aString" });
315- When (Method (mock, returnStringByRef)).ReturnCapture (std::string{" bString" });
316- When (Method (mock, returnStringByRValRef)).ReturnCapture (std::string{" cString" });
317- When (Method (mock, returnMoveOnlyByConstRef)).ReturnCapture (std::unique_ptr<std::string>(new std::string{" aPtrString" }));
318- When (Method (mock, returnMoveOnlyByRef)).ReturnCapture (std::unique_ptr<std::string>(new std::string{" bPtrString" }));
319- When (Method (mock, returnMoveOnlyByRValRef)).ReturnCapture (std::unique_ptr<std::string>(new std::string{" cPtrString" }));
320- When (Method (mock, returnAbstractTypeByRef)).ReturnCapture (ConcreteType{" myConcreteType" });
314+ When (Method (mock, returnStringByConstRef)).ReturnValCapt (std::string{" aString" });
315+ When (Method (mock, returnStringByRef)).ReturnValCapt (std::string{" bString" });
316+ When (Method (mock, returnStringByRValRef)).ReturnValCapt (std::string{" cString" });
317+ When (Method (mock, returnMoveOnlyByConstRef)).ReturnValCapt (std::unique_ptr<std::string>(new std::string{" aPtrString" }));
318+ When (Method (mock, returnMoveOnlyByRef)).ReturnValCapt (std::unique_ptr<std::string>(new std::string{" bPtrString" }));
319+ When (Method (mock, returnMoveOnlyByRValRef)).ReturnValCapt (std::unique_ptr<std::string>(new std::string{" cPtrString" }));
320+ When (Method (mock, returnAbstractTypeByRef)).ReturnValCapt (ConcreteType{" myConcreteType" });
321321 }
322322
323323 ReferenceInterface& i = mock.get ();
@@ -344,10 +344,10 @@ struct ReferenceTypesTests: tpunit::TestFixture {
344344 ConcreteType concrete{" myConcreteType" };
345345
346346 // explicit copy here
347- When (Method (mock, returnStringByConstRef)).AlwaysReturnCapture (aString);
348- When (Method (mock, returnStringByRValRef)).AlwaysReturnCapture (bString);
349- When (Method (mock, returnIntByRef)).AlwaysReturnCapture (num);
350- When (Method (mock, returnAbstractTypeByRef)).AlwaysReturnCapture (concrete);
347+ When (Method (mock, returnStringByConstRef)).AlwaysReturnValCapt (aString);
348+ When (Method (mock, returnStringByRValRef)).AlwaysReturnValCapt (bString);
349+ When (Method (mock, returnIntByRef)).AlwaysReturnValCapt (num);
350+ When (Method (mock, returnAbstractTypeByRef)).AlwaysReturnValCapt (concrete);
351351
352352 // modify now so know whether or not is was copied
353353 aString = " modified" ;
@@ -395,13 +395,13 @@ struct ReferenceTypesTests: tpunit::TestFixture {
395395 ConcreteType concrete{" myConcreteType" };
396396
397397 // explicit move here
398- When (Method (mock, returnStringByConstRef)).AlwaysReturnCapture (std::move (aString));
399- When (Method (mock, returnStringByRef)).AlwaysReturnCapture (std::move (bString));
400- When (Method (mock, returnStringByRValRef)).AlwaysReturnCapture (std::move (cString));
401- When (Method (mock, returnMoveOnlyByConstRef)).AlwaysReturnCapture (std::move (aPtrString));
402- When (Method (mock, returnMoveOnlyByRef)).AlwaysReturnCapture (std::move (bPtrString));
403- When (Method (mock, returnMoveOnlyByRValRef)).AlwaysReturnCapture (std::move (cPtrString));
404- When (Method (mock, returnAbstractTypeByRef)).AlwaysReturnCapture (std::move (concrete));
398+ When (Method (mock, returnStringByConstRef)).AlwaysReturnValCapt (std::move (aString));
399+ When (Method (mock, returnStringByRef)).AlwaysReturnValCapt (std::move (bString));
400+ When (Method (mock, returnStringByRValRef)).AlwaysReturnValCapt (std::move (cString));
401+ When (Method (mock, returnMoveOnlyByConstRef)).AlwaysReturnValCapt (std::move (aPtrString));
402+ When (Method (mock, returnMoveOnlyByRef)).AlwaysReturnValCapt (std::move (bPtrString));
403+ When (Method (mock, returnMoveOnlyByRValRef)).AlwaysReturnValCapt (std::move (cPtrString));
404+ When (Method (mock, returnAbstractTypeByRef)).AlwaysReturnValCapt (std::move (concrete));
405405
406406 // Verify objects were moved.
407407 EXPECT_TRUE (aString.empty ());
@@ -453,13 +453,13 @@ struct ReferenceTypesTests: tpunit::TestFixture {
453453 Mock<ReferenceInterface> mock;
454454
455455 {
456- When (Method (mock, returnStringByConstRef)).AlwaysReturnCapture (std::string{" aString" });
457- When (Method (mock, returnStringByRef)).AlwaysReturnCapture (std::string{" bString" });
458- When (Method (mock, returnStringByRValRef)).AlwaysReturnCapture (std::string{" cString" });
459- When (Method (mock, returnMoveOnlyByConstRef)).AlwaysReturnCapture (std::unique_ptr<std::string>(new std::string{" aPtrString" }));
460- When (Method (mock, returnMoveOnlyByRef)).AlwaysReturnCapture (std::unique_ptr<std::string>(new std::string{" bPtrString" }));
461- When (Method (mock, returnMoveOnlyByRValRef)).AlwaysReturnCapture (std::unique_ptr<std::string>(new std::string{" cPtrString" }));
462- When (Method (mock, returnAbstractTypeByRef)).AlwaysReturnCapture (ConcreteType{" myConcreteType" });
456+ When (Method (mock, returnStringByConstRef)).AlwaysReturnValCapt (std::string{" aString" });
457+ When (Method (mock, returnStringByRef)).AlwaysReturnValCapt (std::string{" bString" });
458+ When (Method (mock, returnStringByRValRef)).AlwaysReturnValCapt (std::string{" cString" });
459+ When (Method (mock, returnMoveOnlyByConstRef)).AlwaysReturnValCapt (std::unique_ptr<std::string>(new std::string{" aPtrString" }));
460+ When (Method (mock, returnMoveOnlyByRef)).AlwaysReturnValCapt (std::unique_ptr<std::string>(new std::string{" bPtrString" }));
461+ When (Method (mock, returnMoveOnlyByRValRef)).AlwaysReturnValCapt (std::unique_ptr<std::string>(new std::string{" cPtrString" }));
462+ When (Method (mock, returnAbstractTypeByRef)).AlwaysReturnValCapt (ConcreteType{" myConcreteType" });
463463 }
464464
465465 ReferenceInterface& i = mock.get ();
0 commit comments