mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 13:37:40 +03:00
make clang-format using clang-format-3.6
This commit is contained in:
parent
4abad2f64c
commit
b1132d6b10
1095 changed files with 30423 additions and 33770 deletions
|
@ -6,11 +6,12 @@
|
|||
|
||||
namespace aria2 {
|
||||
|
||||
class a2algoTest:public CppUnit::TestFixture {
|
||||
class a2algoTest : public CppUnit::TestFixture {
|
||||
|
||||
CPPUNIT_TEST_SUITE(a2algoTest);
|
||||
CPPUNIT_TEST(testSelect);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
void setUp() {}
|
||||
|
||||
|
@ -19,23 +20,20 @@ public:
|
|||
void testSelect();
|
||||
};
|
||||
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(a2algoTest);
|
||||
|
||||
void a2algoTest::testSelect()
|
||||
{
|
||||
size_t A[] = { 1,2,3,4,7,10,11,12,13,14,15,100,112,113,114 };
|
||||
size_t A[] = {1, 2, 3, 4, 7, 10, 11, 12, 13, 14, 15, 100, 112, 113, 114};
|
||||
|
||||
std::pair<size_t*, size_t> p = max_sequence(std::begin(A), std::end(A));
|
||||
CPPUNIT_ASSERT_EQUAL(&A[5], p.first);
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)6, p.second);
|
||||
|
||||
|
||||
p = max_sequence(&A[0], &A[0]);
|
||||
CPPUNIT_ASSERT_EQUAL(&A[0], p.first);
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)0, p.second);
|
||||
|
||||
|
||||
p = max_sequence(&A[0], &A[4]);
|
||||
CPPUNIT_ASSERT_EQUAL(&A[0], p.first);
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)4, p.second);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue