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/cdromfindmountpointfordevice_test.cc | 26 ------------------------ 1 file changed, 26 deletions(-) delete mode 100644 test/libapt/cdromfindmountpointfordevice_test.cc (limited to 'test/libapt/cdromfindmountpointfordevice_test.cc') diff --git a/test/libapt/cdromfindmountpointfordevice_test.cc b/test/libapt/cdromfindmountpointfordevice_test.cc deleted file mode 100644 index 26dcd1459..000000000 --- a/test/libapt/cdromfindmountpointfordevice_test.cc +++ /dev/null @@ -1,26 +0,0 @@ -#include - -#include -#include - -#include -#include - -#include "assert.h" - -int main(int argc, char const *argv[]) { - if (argc != 2) { - std::cout << "One parameter expected - given " << argc << std::endl; - return 100; - } - - _config->Set("Dir::state::Mountpoints", argv[1]); - equals("/", FindMountPointForDevice("rootfs")); - equals("/", FindMountPointForDevice("/dev/disk/by-uuid/fadcbc52-6284-4874-aaaa-dcee1f05fe21")); - equals("/sys", FindMountPointForDevice("sysfs")); - equals("/sys0", FindMountPointForDevice("sysfs0")); - equals("/boot/efi", FindMountPointForDevice("/dev/sda1")); - equals("/tmp", FindMountPointForDevice("tmpfs")); - - return 0; -} -- cgit v1.2.3