summaryrefslogtreecommitdiff
path: root/test/libapt
diff options
context:
space:
mode:
Diffstat (limited to 'test/libapt')
-rw-r--r--test/libapt/acqprogress_test.cc6
-rw-r--r--test/libapt/hashsums_test.cc3
2 files changed, 7 insertions, 2 deletions
diff --git a/test/libapt/acqprogress_test.cc b/test/libapt/acqprogress_test.cc
index 288e05aca..c634733d4 100644
--- a/test/libapt/acqprogress_test.cc
+++ b/test/libapt/acqprogress_test.cc
@@ -1,4 +1,5 @@
#include <config.h>
+#include <apt-pkg/hashes.h>
#include <apt-pkg/acquire.h>
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/configuration.h>
@@ -10,9 +11,10 @@
class TestItem: public pkgAcquire::Item
{
public:
- TestItem(pkgAcquire * const Acq) : pkgAcquire::Item(Acq, "", NULL) {}
+ TestItem(pkgAcquire * const Acq) : pkgAcquire::Item(Acq) {}
- virtual std::string DescURI() { return ""; }
+ virtual std::string DescURI() const { return ""; }
+ virtual HashStringList GetExpectedHashes() const { return HashStringList(); }
};
diff --git a/test/libapt/hashsums_test.cc b/test/libapt/hashsums_test.cc
index edcd8a11a..63c63ecd3 100644
--- a/test/libapt/hashsums_test.cc
+++ b/test/libapt/hashsums_test.cc
@@ -306,6 +306,7 @@ TEST(HashSumsTest, HashStringList)
EXPECT_EQ(NULL, list.find(NULL));
EXPECT_EQ(NULL, list.find(""));
EXPECT_EQ(NULL, list.find("MD5Sum"));
+ EXPECT_EQ(0, list.FileSize());
// empty lists aren't equal
HashStringList list2;
@@ -316,6 +317,8 @@ TEST(HashSumsTest, HashStringList)
list.push_back(HashString("Checksum-FileSize", "29"));
EXPECT_FALSE(list.empty());
EXPECT_FALSE(list.usable());
+ EXPECT_EQ(1, list.size());
+ EXPECT_EQ(29, list.FileSize());
Hashes hashes;
hashes.Add("The quick brown fox jumps over the lazy dog");