diff options
Diffstat (limited to 'paludis/comma_separated_dep_parser_TEST.cc')
-rw-r--r-- | paludis/comma_separated_dep_parser_TEST.cc | 31 |
1 files changed, 11 insertions, 20 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 <paludis/comma_separated_dep_pretty_printer.hh> #include <paludis/environments/test/test_environment.hh> #include <paludis/unformatted_pretty_printer.hh> -#include <test/test_framework.hh> -#include <test/test_runner.hh> + +#include <gtest/gtest.h> 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<const DependencySpecTree> 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<const DependencySpecTree> 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()); } |