mirror of
https://github.com/aria2/aria2.git
synced 2024-12-14 09:28:55 +00:00
1b7c198289
Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
30 lines
588 B
C++
30 lines
588 B
C++
#include "TimeSeedCriteria.h"
|
|
#include "Util.h"
|
|
#include <cppunit/extensions/HelperMacros.h>
|
|
|
|
namespace aria2 {
|
|
|
|
class TimeSeedCriteriaTest:public CppUnit::TestFixture {
|
|
|
|
CPPUNIT_TEST_SUITE(TimeSeedCriteriaTest);
|
|
CPPUNIT_TEST(testEvaluate);
|
|
CPPUNIT_TEST_SUITE_END();
|
|
|
|
public:
|
|
void testEvaluate();
|
|
};
|
|
|
|
|
|
CPPUNIT_TEST_SUITE_REGISTRATION(TimeSeedCriteriaTest);
|
|
|
|
void TimeSeedCriteriaTest::testEvaluate() {
|
|
TimeSeedCriteria cri(1);
|
|
Util::sleep(1);
|
|
CPPUNIT_ASSERT(cri.evaluate());
|
|
cri.reset();
|
|
cri.setDuration(10);
|
|
CPPUNIT_ASSERT(!cri.evaluate());
|
|
}
|
|
|
|
} // namespace aria2
|