diff options
author | 2011-03-24 23:16:42 +0000 | |
---|---|---|
committer | 2011-03-24 23:16:42 +0000 | |
commit | 3631299d2ec0cdad20ef63835dd43bba9d7f4d15 (patch) | |
tree | c9614e9c9e3555284099c67a9a232dd27a3039a7 | |
parent | bf1d668f76ff870ac767accf85816e49c9718fe0 (diff) | |
download | paludis-3631299d2ec0cdad20ef63835dd43bba9d7f4d15.tar.gz paludis-3631299d2ec0cdad20ef63835dd43bba9d7f4d15.tar.xz |
gtest more
-rw-r--r-- | paludis/files.m4 | 2 | ||||
-rw-r--r-- | 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 <paludis/stripper.hh> + #include <paludis/environments/test/test_environment.hh> + #include <paludis/util/fs_stat.hh> #include <paludis/util/make_named_values.hh> -#include <test/test_runner.hh> -#include <test/test_framework.hh> -using namespace test; +#include <gtest/gtest.h> + 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<StripperOptions>( + 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<StripperOptions>( - 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()); } |