clang-format-5.0

This commit is contained in:
Tatsuhiro Tsujikawa 2017-11-23 14:11:43 +09:00
parent 20a7c43f2d
commit 795a0474df
48 changed files with 595 additions and 284 deletions

View file

@ -149,53 +149,38 @@ void RequestGroupManTest::testChangeReservedGroupPosition()
std::make_shared<RequestGroup>(GroupId::create(), util::copy(option_))};
RequestGroupMan rm(gs, 0, option_.get());
CPPUNIT_ASSERT_EQUAL(
(size_t)0,
rm.changeReservedGroupPosition(gs[0]->getGID(), 0, OFFSET_MODE_SET));
CPPUNIT_ASSERT_EQUAL(
(size_t)1,
rm.changeReservedGroupPosition(gs[0]->getGID(), 1, OFFSET_MODE_SET));
CPPUNIT_ASSERT_EQUAL(
(size_t)3,
rm.changeReservedGroupPosition(gs[0]->getGID(), 10, OFFSET_MODE_SET));
CPPUNIT_ASSERT_EQUAL(
(size_t)0,
rm.changeReservedGroupPosition(gs[0]->getGID(), -10, OFFSET_MODE_SET));
CPPUNIT_ASSERT_EQUAL((size_t)0, rm.changeReservedGroupPosition(
gs[0]->getGID(), 0, OFFSET_MODE_SET));
CPPUNIT_ASSERT_EQUAL((size_t)1, rm.changeReservedGroupPosition(
gs[0]->getGID(), 1, OFFSET_MODE_SET));
CPPUNIT_ASSERT_EQUAL((size_t)3, rm.changeReservedGroupPosition(
gs[0]->getGID(), 10, OFFSET_MODE_SET));
CPPUNIT_ASSERT_EQUAL((size_t)0, rm.changeReservedGroupPosition(
gs[0]->getGID(), -10, OFFSET_MODE_SET));
CPPUNIT_ASSERT_EQUAL(
(size_t)1,
rm.changeReservedGroupPosition(gs[1]->getGID(), 0, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL(
(size_t)2,
rm.changeReservedGroupPosition(gs[1]->getGID(), 1, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL(
(size_t)1,
rm.changeReservedGroupPosition(gs[1]->getGID(), -1, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL(
(size_t)0,
rm.changeReservedGroupPosition(gs[1]->getGID(), -10, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL(
(size_t)1,
rm.changeReservedGroupPosition(gs[1]->getGID(), 1, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL(
(size_t)3,
rm.changeReservedGroupPosition(gs[1]->getGID(), 10, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL(
(size_t)1,
rm.changeReservedGroupPosition(gs[1]->getGID(), -2, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL((size_t)1, rm.changeReservedGroupPosition(
gs[1]->getGID(), 0, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL((size_t)2, rm.changeReservedGroupPosition(
gs[1]->getGID(), 1, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL((size_t)1, rm.changeReservedGroupPosition(
gs[1]->getGID(), -1, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL((size_t)0, rm.changeReservedGroupPosition(
gs[1]->getGID(), -10, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL((size_t)1, rm.changeReservedGroupPosition(
gs[1]->getGID(), 1, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL((size_t)3, rm.changeReservedGroupPosition(
gs[1]->getGID(), 10, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL((size_t)1, rm.changeReservedGroupPosition(
gs[1]->getGID(), -2, OFFSET_MODE_CUR));
CPPUNIT_ASSERT_EQUAL(
(size_t)3,
rm.changeReservedGroupPosition(gs[3]->getGID(), 0, OFFSET_MODE_END));
CPPUNIT_ASSERT_EQUAL(
(size_t)2,
rm.changeReservedGroupPosition(gs[3]->getGID(), -1, OFFSET_MODE_END));
CPPUNIT_ASSERT_EQUAL(
(size_t)0,
rm.changeReservedGroupPosition(gs[3]->getGID(), -10, OFFSET_MODE_END));
CPPUNIT_ASSERT_EQUAL(
(size_t)3,
rm.changeReservedGroupPosition(gs[3]->getGID(), 10, OFFSET_MODE_END));
CPPUNIT_ASSERT_EQUAL((size_t)3, rm.changeReservedGroupPosition(
gs[3]->getGID(), 0, OFFSET_MODE_END));
CPPUNIT_ASSERT_EQUAL((size_t)2, rm.changeReservedGroupPosition(
gs[3]->getGID(), -1, OFFSET_MODE_END));
CPPUNIT_ASSERT_EQUAL((size_t)0, rm.changeReservedGroupPosition(
gs[3]->getGID(), -10, OFFSET_MODE_END));
CPPUNIT_ASSERT_EQUAL((size_t)3, rm.changeReservedGroupPosition(
gs[3]->getGID(), 10, OFFSET_MODE_END));
CPPUNIT_ASSERT_EQUAL((size_t)4, rm.getReservedGroups().size());