[unit-test] remove extra \n at end of error message (#4367)

This commit removes the extra `\n` at the end of error message strings
used in `VerifyOrQuit()` or `SuccessOrQuit()` macros in different unit
test modules. This help make the style (usage of macros) consistent
across all unit tests.
This commit is contained in:
Abtin Keshavarzian
2019-12-11 09:16:48 -08:00
committed by Jonathan Hui
parent 720e9130da
commit ab27fcd9e6
12 changed files with 419 additions and 419 deletions
+5 -5
View File
@@ -51,11 +51,11 @@ void TestAllocateSingle(void)
{
void *p = heap.CAlloc(1, 0);
VerifyOrQuit(p == NULL && totalSize == heap.GetFreeSize(), "TestAllocateSingle allocate 1 x 0 byte failed!\n");
VerifyOrQuit(p == NULL && totalSize == heap.GetFreeSize(), "TestAllocateSingle allocate 1 x 0 byte failed!");
heap.Free(p);
p = heap.CAlloc(0, 1);
VerifyOrQuit(p == NULL && totalSize == heap.GetFreeSize(), "TestAllocateSingle allocate 0 x 1 byte failed!\n");
VerifyOrQuit(p == NULL && totalSize == heap.GetFreeSize(), "TestAllocateSingle allocate 0 x 1 byte failed!");
heap.Free(p);
}
@@ -63,7 +63,7 @@ void TestAllocateSingle(void)
{
Log("%s allocating %zu bytes...", __func__, size);
void *p = heap.CAlloc(1, size);
VerifyOrQuit(p != NULL && !heap.IsClean() && heap.GetFreeSize() + size <= totalSize, "allocating failed!\n");
VerifyOrQuit(p != NULL && !heap.IsClean() && heap.GetFreeSize() + size <= totalSize, "allocating failed!");
memset(p, 0xff, size);
heap.Free(p);
VerifyOrQuit(heap.IsClean() && heap.GetFreeSize() == totalSize, "freeing failed!\n");
@@ -106,7 +106,7 @@ void TestAllocateRandomly(size_t aSizeLimit, unsigned int aSeed)
break;
}
VerifyOrQuit(last->mNext->mNext == NULL, "TestAllocateRandomly memory not initialized to zero!\n");
VerifyOrQuit(last->mNext->mNext == NULL, "TestAllocateRandomly memory not initialized to zero!");
last = last->mNext;
last->mSize = size;
++nnodes;
@@ -150,7 +150,7 @@ void TestAllocateRandomly(size_t aSizeLimit, unsigned int aSeed)
}
VerifyOrQuit(heap.IsClean() && heap.GetFreeSize() == totalSize,
"TestAllocateRandomly heap not clean after freeing all!\n");
"TestAllocateRandomly heap not clean after freeing all!");
}
/**