Call pass() in AbstractFifo unit test

This commit is contained in:
Vinnie Falco
2013-07-28 01:56:53 -07:00
parent 9fde380230
commit e30e663ab2

View File

@@ -180,7 +180,7 @@ public:
void runTest()
{
beginTest ("AbstractFifo");
beginTestCase ("AbstractFifo");
int buffer [5000];
AbstractFifo fifo (numElementsInArray (buffer));
@@ -190,6 +190,8 @@ public:
int n = 0;
Random r;
bool failed = false;
for (int count = 100000; --count >= 0;)
{
int num = r.nextInt (6000) + 1;
@@ -205,8 +207,6 @@ public:
break;
}
bool failed = false;
for (int i = 0; i < size1; ++i)
failed = (buffer [start1 + i] != n++) || failed;
@@ -215,12 +215,13 @@ public:
if (failed)
{
expect (false, "read values were incorrect");
break;
}
fifo.finishedRead (size1 + size2);
}
expect (! failed, "read values were incorrect");
}
};