mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Call pass() in AbstractFifo unit test
This commit is contained in:
@@ -180,7 +180,7 @@ public:
|
|||||||
|
|
||||||
void runTest()
|
void runTest()
|
||||||
{
|
{
|
||||||
beginTest ("AbstractFifo");
|
beginTestCase ("AbstractFifo");
|
||||||
|
|
||||||
int buffer [5000];
|
int buffer [5000];
|
||||||
AbstractFifo fifo (numElementsInArray (buffer));
|
AbstractFifo fifo (numElementsInArray (buffer));
|
||||||
@@ -190,6 +190,8 @@ public:
|
|||||||
int n = 0;
|
int n = 0;
|
||||||
Random r;
|
Random r;
|
||||||
|
|
||||||
|
bool failed = false;
|
||||||
|
|
||||||
for (int count = 100000; --count >= 0;)
|
for (int count = 100000; --count >= 0;)
|
||||||
{
|
{
|
||||||
int num = r.nextInt (6000) + 1;
|
int num = r.nextInt (6000) + 1;
|
||||||
@@ -205,8 +207,6 @@ public:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool failed = false;
|
|
||||||
|
|
||||||
for (int i = 0; i < size1; ++i)
|
for (int i = 0; i < size1; ++i)
|
||||||
failed = (buffer [start1 + i] != n++) || failed;
|
failed = (buffer [start1 + i] != n++) || failed;
|
||||||
|
|
||||||
@@ -215,12 +215,13 @@ public:
|
|||||||
|
|
||||||
if (failed)
|
if (failed)
|
||||||
{
|
{
|
||||||
expect (false, "read values were incorrect");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
fifo.finishedRead (size1 + size2);
|
fifo.finishedRead (size1 + size2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expect (! failed, "read values were incorrect");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user