Skip to content

Commit

Permalink
Cleanup of unit tests (comments)
Browse files Browse the repository at this point in the history
  • Loading branch information
SRombauts committed Oct 3, 2014
1 parent 1e8cd29 commit ebc24ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/shared_ptr_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

struct Struct
{
Struct(int aVal) :
explicit Struct(int aVal) :
mVal(aVal)
{
++_mNbInstances;
Expand Down
12 changes: 6 additions & 6 deletions tests/unique_ptr_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

struct Struct2
{
Struct2(int aVal) :
explicit Struct2(int aVal) :
mVal(aVal)
{
++_mNbInstances;
Expand Down Expand Up @@ -107,7 +107,7 @@ TEST(unique_ptr, basic_ptr)
xPtr->decr();
xPtr->decr();

// Copy construct the unique_ptr, transfering ownership
// Copy construct the unique_ptr, transferring ownership
unique_ptr<Struct2> yPtr(xPtr);

EXPECT_NE(xPtr, yPtr);
Expand All @@ -120,8 +120,8 @@ TEST(unique_ptr, basic_ptr)

if (yPtr)
{
// Assign the unique_ptr, transfering ownership
unique_ptr<Struct2> zPtr;
// Assign the unique_ptr, transferring ownership
zPtr = yPtr;

EXPECT_NE(yPtr, zPtr);
Expand Down Expand Up @@ -175,7 +175,7 @@ TEST(unique_ptr, reset_ptr)
EXPECT_EQ(1, Struct2::_mNbInstances);
EXPECT_NE(pX, xPtr.get());

// Copy-construct a new unique_ptr to the same object
// Copy-construct a new unique_ptr to the same object, transferring ownership
unique_ptr<Struct2> yPtr(xPtr);

EXPECT_NE(xPtr, yPtr);
Expand Down Expand Up @@ -288,8 +288,8 @@ TEST(unique_ptr, std_container)
{
std::vector<unique_ptr<Struct2> > PtrList;

// Move-it inside a container, transfering ownership
PtrList.push_back(xPtr);
// Move-it inside a container, transferring ownership
PtrList.push_back(move(xPtr));

EXPECT_EQ(false, xPtr);
EXPECT_EQ(true, PtrList.back());
Expand Down

0 comments on commit ebc24ee

Please sign in to comment.