From 3631299d2ec0cdad20ef63835dd43bba9d7f4d15 Mon Sep 17 00:00:00 2001 From: Ciaran McCreesh Date: Thu, 24 Mar 2011 23:16:42 +0000 Subject: gtest more --- paludis/files.m4 | 2 +- paludis/stripper_TEST.cc | 40 ++++++++++++++-------------------------- 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/paludis/files.m4 b/paludis/files.m4 index 944c6346b..b811141b6 100644 --- a/paludis/files.m4 +++ b/paludis/files.m4 @@ -96,7 +96,7 @@ add(`set_file', `hh', `cc', `se', `test', `te add(`slot_requirement', `hh', `fwd', `cc') add(`spec_tree', `hh', `fwd', `cc') add(`standard_output_manager', `hh', `cc', `fwd') -add(`stripper', `hh', `cc', `fwd', `test', `testscript') +add(`stripper', `hh', `cc', `fwd', `gtest', `testscript') add(`syncer', `hh', `cc') add(`tar_merger', `hh', `cc', `fwd', `gtest', `testscript', `se') add(`tee_output_manager', `hh', `cc', `fwd') diff --git a/paludis/stripper_TEST.cc b/paludis/stripper_TEST.cc index 6ddc86671..bfbb3bc4e 100644 --- a/paludis/stripper_TEST.cc +++ b/paludis/stripper_TEST.cc @@ -18,13 +18,14 @@ */ #include + #include + #include #include -#include -#include -using namespace test; +#include + using namespace paludis; namespace @@ -60,30 +61,17 @@ namespace }; } -namespace test_cases +TEST(Stripper, Works) { - struct StripperTest : TestCase - { - StripperTest() : TestCase("stripper") { } + TestStripper s(make_named_values( + n::compress_splits() = false, + n::debug_dir() = FSPath("stripper_TEST_dir/image").realpath() / "usr" / "lib" / "debug", + n::image_dir() = FSPath("stripper_TEST_dir/image").realpath(), + n::split() = true, + n::strip() = true + )); + s.strip(); - void run() - { - TestStripper s(make_named_values( - n::compress_splits() = false, - n::debug_dir() = FSPath("stripper_TEST_dir/image").realpath() / "usr" / "lib" / "debug", - n::image_dir() = FSPath("stripper_TEST_dir/image").realpath(), - n::split() = true, - n::strip() = true - )); - s.strip(); - - TEST_CHECK(FSPath("stripper_TEST_dir/image/usr/lib/debug/usr/bin/stripper_TEST_binary.debug").stat().is_regular_file()); - } - - bool repeatable() const - { - return false; - } - } test_stripper; + ASSERT_TRUE(FSPath("stripper_TEST_dir/image/usr/lib/debug/usr/bin/stripper_TEST_binary.debug").stat().is_regular_file()); } -- cgit v1.2.3