diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/interactive-helper/testdeb.cc | 7 | ||||
-rw-r--r-- | test/libapt/cdromreducesourcelist_test.cc | 2 | ||||
-rw-r--r-- | test/libapt/configuration_test.cc | 2 | ||||
-rw-r--r-- | test/libapt/fileutl_test.cc | 2 | ||||
-rw-r--r-- | test/libapt/getarchitectures_test.cc | 2 | ||||
-rw-r--r-- | test/libapt/globalerror_test.cc | 2 | ||||
-rw-r--r-- | test/libapt/hashsums_test.cc | 5 | ||||
-rw-r--r-- | test/libapt/parsedepends_test.cc | 2 | ||||
-rw-r--r-- | test/libapt/sourcelist_test.cc | 2 | ||||
-rw-r--r-- | test/libapt/strutil_test.cc | 2 | ||||
-rw-r--r-- | test/libapt/tagfile_test.cc | 2 |
11 files changed, 20 insertions, 10 deletions
diff --git a/test/interactive-helper/testdeb.cc b/test/interactive-helper/testdeb.cc index 89375af13..9520d1b50 100644 --- a/test/interactive-helper/testdeb.cc +++ b/test/interactive-helper/testdeb.cc @@ -6,7 +6,7 @@ class NullStream : public pkgDirStream { public: - virtual bool DoItem(Item &Itm,int &Fd) {return true;}; + virtual bool DoItem(Item &/*Itm*/, int &/*Fd*/) {return true;}; }; static bool Test(const char *File) @@ -33,6 +33,11 @@ static bool Test(const char *File) int main(int argc, const char *argv[]) { + if (argc != 2) { + std::cout << "One parameter expected - given " << argc << std::endl; + return 100; + } + Test(argv[1]); _error->DumpErrors(); return 0; diff --git a/test/libapt/cdromreducesourcelist_test.cc b/test/libapt/cdromreducesourcelist_test.cc index 729da23a6..b0314769d 100644 --- a/test/libapt/cdromreducesourcelist_test.cc +++ b/test/libapt/cdromreducesourcelist_test.cc @@ -15,7 +15,7 @@ public: } }; -int main(int argc, char const *argv[]) { +int main() { Cdrom cd; std::vector<std::string> List; std::string CD("/media/cdrom/"); diff --git a/test/libapt/configuration_test.cc b/test/libapt/configuration_test.cc index 957e905d5..d2efc1b4b 100644 --- a/test/libapt/configuration_test.cc +++ b/test/libapt/configuration_test.cc @@ -5,7 +5,7 @@ #include "assert.h" -int main(int argc,const char *argv[]) { +int main() { Configuration Cnf; std::vector<std::string> fds; diff --git a/test/libapt/fileutl_test.cc b/test/libapt/fileutl_test.cc index 462bdefd9..d256ea55a 100644 --- a/test/libapt/fileutl_test.cc +++ b/test/libapt/fileutl_test.cc @@ -10,7 +10,7 @@ #include <stdlib.h> -int main(int argc,char *argv[]) +int main() { std::vector<std::string> files; diff --git a/test/libapt/getarchitectures_test.cc b/test/libapt/getarchitectures_test.cc index 807469263..508d5e458 100644 --- a/test/libapt/getarchitectures_test.cc +++ b/test/libapt/getarchitectures_test.cc @@ -7,7 +7,7 @@ #include <iostream> -int main(int argc,char *argv[]) +int main() { std::vector<std::string> vec; diff --git a/test/libapt/globalerror_test.cc b/test/libapt/globalerror_test.cc index b6939231d..742fa53bd 100644 --- a/test/libapt/globalerror_test.cc +++ b/test/libapt/globalerror_test.cc @@ -5,7 +5,7 @@ #include <errno.h> #include <string.h> -int main(int argc,char *argv[]) +int main() { std::string const textOfErrnoZero(strerror(0)); diff --git a/test/libapt/hashsums_test.cc b/test/libapt/hashsums_test.cc index 3da89052b..410e2c44d 100644 --- a/test/libapt/hashsums_test.cc +++ b/test/libapt/hashsums_test.cc @@ -43,6 +43,11 @@ template <class T> void TestMill(const char *Out) int main(int argc, char** argv) { + if (argc != 6) { + std::cout << "Five parameter expected - given " << argc << std::endl; + return 100; + } + // test HashSumValue which doesn't calculate but just stores sums { string md5sum = argv[2]; diff --git a/test/libapt/parsedepends_test.cc b/test/libapt/parsedepends_test.cc index 67dbab823..5a2c65573 100644 --- a/test/libapt/parsedepends_test.cc +++ b/test/libapt/parsedepends_test.cc @@ -3,7 +3,7 @@ #include "assert.h" -int main(int argc,char *argv[]) { +int main() { std::string Package; std::string Version; unsigned int Op = 5; diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc index e79b6d65e..0637df03b 100644 --- a/test/libapt/sourcelist_test.cc +++ b/test/libapt/sourcelist_test.cc @@ -19,7 +19,7 @@ static void remove_tmpfile(void) } } -int main(int argc, char *argv[]) +int main() { _config->Set("APT::Sources::Use-Deb822", true); diff --git a/test/libapt/strutil_test.cc b/test/libapt/strutil_test.cc index 8215654d0..a4516e7a1 100644 --- a/test/libapt/strutil_test.cc +++ b/test/libapt/strutil_test.cc @@ -2,7 +2,7 @@ #include "assert.h" -int main(int argc,char *argv[]) +int main() { std::string input, output, expected; diff --git a/test/libapt/tagfile_test.cc b/test/libapt/tagfile_test.cc index effc3244b..24f258275 100644 --- a/test/libapt/tagfile_test.cc +++ b/test/libapt/tagfile_test.cc @@ -19,7 +19,7 @@ static void remove_tmpfile(void) } } -int main(int argc, char *argv[]) +int main() { FileFd fd; const char contents[] = "FieldA-12345678: the value of the field"; |