~ubuntu-branches/ubuntu/wily/aria2/wily-proposed

« back to all changes in this revision

Viewing changes to test/WrDiskCacheEntryTest.cc

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry, Kartik Mistry, Patrick Ruckstuhl
  • Date: 2013-09-22 18:52:14 UTC
  • mfrom: (2.5.19 sid)
  • Revision ID: package-import@ubuntu.com-20130922185214-upeu2ljgeqi7e7oo
Tags: 1.18.0-1
[ Kartik Mistry ]
* New upstream release.
* debian/control:
  + (really) Set priority to optional from extra (Closes: #697659).
  + wrap-and-sort some fields.

[ Patrick Ruckstuhl ]
* debian/rules:
  + Allow parallel building (Closes: #720977)
* debian/tests, debian/control:
  + autopkgtest infrastructure

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
  CPPUNIT_TEST(testClear);
19
19
  CPPUNIT_TEST_SUITE_END();
20
20
 
21
 
  SharedHandle<DirectDiskAdaptor> adaptor_;
22
 
  SharedHandle<ByteArrayDiskWriter> writer_;
 
21
  std::shared_ptr<DirectDiskAdaptor> adaptor_;
 
22
  ByteArrayDiskWriter* writer_;
23
23
public:
24
24
  void setUp()
25
25
  {
26
 
    adaptor_.reset(new DirectDiskAdaptor());
27
 
    writer_.reset(new ByteArrayDiskWriter());
28
 
    adaptor_->setDiskWriter(writer_);
 
26
    adaptor_ = std::make_shared<DirectDiskAdaptor>();
 
27
    auto dw = make_unique<ByteArrayDiskWriter>();
 
28
    writer_ = dw.get();
 
29
    adaptor_->setDiskWriter(std::move(dw));
29
30
  }
30
31
 
31
32
  void testWriteToDisk();
48
49
void WrDiskCacheEntryTest::testAppend()
49
50
{
50
51
  WrDiskCacheEntry e(adaptor_);
51
 
  WrDiskCacheEntry::DataCell* cell = new WrDiskCacheEntry::DataCell();
 
52
  auto cell = new WrDiskCacheEntry::DataCell{};
52
53
  cell->goff = 0;
53
54
  size_t capacity = 6;
54
55
  size_t offset = 2;