Convert unit tests to beast

This commit is contained in:
Vinnie Falco
2013-07-24 06:49:03 -07:00
parent 3f26375583
commit c27294e0f0
32 changed files with 1337 additions and 1480 deletions

View File

@@ -260,3 +260,36 @@ void RangeSet::checkInternalConsistency () const noexcept
#endif
}
//------------------------------------------------------------------------------
class RangeSetTests : public UnitTest
{
public:
RangeSetTests () : UnitTest ("RangeSet", "ripple")
{
}
void runTest ()
{
beginTest ("membership");
RangeSet r1, r2;
r1.setRange (1, 10);
r1.clearValue (5);
r1.setRange (11, 20);
r2.setRange (1, 4);
r2.setRange (6, 10);
r2.setRange (10, 20);
expect (!r1.hasValue (5));
expect (r2.hasValue (9));
// TODO: Traverse functions must be tested
}
};
static RangeSetTests rangeSetTests;