From 453b82a388013e522b3a1b9fcd6ed0810dab1f4f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 5 Mar 2014 22:11:25 +0100 Subject: cleanup headers and especially #includes everywhere Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use) --- test/libapt/commandlineasstring_test.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/libapt/commandlineasstring_test.cc') diff --git a/test/libapt/commandlineasstring_test.cc b/test/libapt/commandlineasstring_test.cc index a38957d7e..5c005e956 100644 --- a/test/libapt/commandlineasstring_test.cc +++ b/test/libapt/commandlineasstring_test.cc @@ -1,3 +1,5 @@ +#include + #include #include -- cgit v1.2.3 From f00832cc273e52a47fb88e49849891b771de4e17 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 16 Apr 2014 17:09:37 +0200 Subject: use Google C++ Testing Framework for libapt tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit My commit 45df0ad2 from 26. Nov 2009 had a little remark: "The commit also includes a very very simple testapp." This was never intended to be permanent, but as usually… The commit adds the needed make magic to compile gtest statically as it is required and links it against a small runner. All previous testcase binaries are reimplemented in gtest and combined in this runner. While most code is a 1:1 translation some had to be rewritten like compareversion_test.cc, but the coverage remains the same. --- test/libapt/commandlineasstring_test.cc | 41 --------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 test/libapt/commandlineasstring_test.cc (limited to 'test/libapt/commandlineasstring_test.cc') diff --git a/test/libapt/commandlineasstring_test.cc b/test/libapt/commandlineasstring_test.cc deleted file mode 100644 index 5c005e956..000000000 --- a/test/libapt/commandlineasstring_test.cc +++ /dev/null @@ -1,41 +0,0 @@ -#include - -#include -#include - -#include - -#include "assert.h" - -class CLT: public CommandLine { - - public: - std::string static AsString(const char * const * const argv, - unsigned int const argc) { - std::string const static conf = "Commandline::AsString"; - _config->Clear(conf); - SaveInConfig(argc, argv); - return _config->Find(conf); - } -}; - -#define CMD(y,z) equals(CLT::AsString(argv, y), z); - -int main() { - { - const char* const argv[] = {"apt-get", "install", "-sf"}; - CMD(3, "apt-get install -sf"); - } - { - const char* const argv[] = {"apt-cache", "-s", "apt", "-so", "Debug::test=Test"}; - CMD(5, "apt-cache -s apt -so Debug::test=Test"); - } - { - const char* const argv[] = {"apt-cache", "-s", "apt", "-so", "Debug::test=Das ist ein Test"}; - CMD(5, "apt-cache -s apt -so Debug::test=\"Das ist ein Test\""); - } - { - const char* const argv[] = {"apt-cache", "-s", "apt", "--hallo", "test=1.0"}; - CMD(5, "apt-cache -s apt --hallo test=1.0"); - } -} -- cgit v1.2.3