summaryrefslogtreecommitdiff
path: root/test/libapt
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2011-08-15 14:10:42 +0200
committerMichael Vogt <egon@debian-devbox>2011-08-15 14:10:42 +0200
commitc5ca2c52a98fcb50de6429cf370ed5b6b7602a00 (patch)
tree03dbb2f6898ad12126c40e6f7c64c01e863ccacd /test/libapt
parent97efc27f0723f09405d7a1836ab21c2e2948eb10 (diff)
parentd4882aa1e1a37b3092950180036676a930a5792f (diff)
merged from the debian-sid branch
Diffstat (limited to 'test/libapt')
-rw-r--r--test/libapt/assert.h8
-rw-r--r--test/libapt/getarchitectures_test.cc7
-rw-r--r--test/libapt/getlanguages_test.cc7
-rw-r--r--test/libapt/getlistoffilesindir_test.cc7
4 files changed, 8 insertions, 21 deletions
diff --git a/test/libapt/assert.h b/test/libapt/assert.h
index 92b662dfa..fae9b6c64 100644
--- a/test/libapt/assert.h
+++ b/test/libapt/assert.h
@@ -53,3 +53,11 @@ void assertEqualsOr2(int const &expect1, int const &expect2, unsigned int const
assertEqualsOr2<unsigned int const&, unsigned int const&>(expect1, expect2, get, line);
}
+
+// simple helper to quickly output a vectors
+template < typename X >
+void dumpVector(X vec) {
+ for (typename X::const_iterator v = vec.begin();
+ v != vec.end(); ++v)
+ std::cout << *v << std::endl;
+}
diff --git a/test/libapt/getarchitectures_test.cc b/test/libapt/getarchitectures_test.cc
index e3ca7bbc2..807469263 100644
--- a/test/libapt/getarchitectures_test.cc
+++ b/test/libapt/getarchitectures_test.cc
@@ -7,13 +7,6 @@
#include <iostream>
-// simple helper to quickly output a vector of strings
-void dumpVector(std::vector<std::string> vec) {
- for (std::vector<std::string>::const_iterator v = vec.begin();
- v != vec.end(); v++)
- std::cout << *v << std::endl;
-}
-
int main(int argc,char *argv[])
{
std::vector<std::string> vec;
diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc
index 3d63e0e74..f6aa7a697 100644
--- a/test/libapt/getlanguages_test.cc
+++ b/test/libapt/getlanguages_test.cc
@@ -7,13 +7,6 @@
#include <iostream>
-// simple helper to quickly output a vector of strings
-void dumpVector(std::vector<std::string> vec) {
- for (std::vector<std::string>::const_iterator v = vec.begin();
- v != vec.end(); v++)
- std::cout << *v << std::endl;
-}
-
int main(int argc,char *argv[])
{
if (argc != 2) {
diff --git a/test/libapt/getlistoffilesindir_test.cc b/test/libapt/getlistoffilesindir_test.cc
index ed8d2dad6..5ee014cca 100644
--- a/test/libapt/getlistoffilesindir_test.cc
+++ b/test/libapt/getlistoffilesindir_test.cc
@@ -7,13 +7,6 @@
#include <stdio.h>
#include <iostream>
-// simple helper to quickly output a vector of strings
-void dumpVector(std::vector<std::string> vec) {
- for (std::vector<std::string>::const_iterator v = vec.begin();
- v != vec.end(); v++)
- std::cout << *v << std::endl;
-}
-
#define P(x) string(argv[1]).append("/").append(x)
int main(int argc,char *argv[])