From e48dc64d5153f99cb7492186af710644a1f2c301 Mon Sep 17 00:00:00 2001 From: Ciaran McCreesh Date: Sun, 20 Mar 2011 20:54:04 +0000 Subject: gtest more --- paludis/comma_separated_dep_parser_TEST.cc | 31 +++++++++++------------------- paludis/files.m4 | 2 +- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/paludis/comma_separated_dep_parser_TEST.cc b/paludis/comma_separated_dep_parser_TEST.cc index e87e95ab6..394765b10 100644 --- a/paludis/comma_separated_dep_parser_TEST.cc +++ b/paludis/comma_separated_dep_parser_TEST.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh + * Copyright (c) 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -21,28 +21,19 @@ #include #include #include -#include -#include + +#include using namespace paludis; -using namespace test; -namespace test_cases +TEST(CommaSeparatedDepParser, Works) { - struct CommaSeparatedDepParserTest : TestCase - { - CommaSeparatedDepParserTest() : TestCase("comma separated dep parser") { } - - void run() - { - TestEnvironment env; - std::shared_ptr spec( - CommaSeparatedDepParser::parse(&env, "cat/one , cat/two, cat/three\n")); - UnformattedPrettyPrinter f; - CommaSeparatedDepPrettyPrinter p(f, { }); - spec->top()->accept(p); - TEST_CHECK_EQUAL(p.result(), "cat/one, cat/two, cat/three"); - } - } test_dep_parser; + TestEnvironment env; + std::shared_ptr spec( + CommaSeparatedDepParser::parse(&env, "cat/one , cat/two, cat/three\n")); + UnformattedPrettyPrinter f; + CommaSeparatedDepPrettyPrinter p(f, { }); + spec->top()->accept(p); + EXPECT_EQ("cat/one, cat/two, cat/three", p.result()); } diff --git a/paludis/files.m4 b/paludis/files.m4 index 0441c86b0..2d998ef87 100644 --- a/paludis/files.m4 +++ b/paludis/files.m4 @@ -20,7 +20,7 @@ add(`buffer_output_manager', `hh', `cc', `fwd') add(`call_pretty_printer', `hh', `cc', `fwd') add(`changed_choices', `hh', `cc', `fwd') add(`choice', `hh', `cc', `fwd') -add(`comma_separated_dep_parser', `hh', `cc', `test') +add(`comma_separated_dep_parser', `hh', `cc', `gtest') add(`comma_separated_dep_pretty_printer', `hh', `cc', `fwd') add(`command_output_manager', `hh', `cc', `fwd') add(`common_sets', `hh', `cc', `fwd') -- cgit v1.2.3