aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-20 20:54:04 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-20 20:54:04 +0000
commite48dc64d5153f99cb7492186af710644a1f2c301 (patch)
treedfc59add2b90903d2a3508b7a88be2bf27df8614
parentb2488013b28e3d42cf53fdb06b913365be62e1ca (diff)
downloadpaludis-e48dc64d5153f99cb7492186af710644a1f2c301.tar.gz
paludis-e48dc64d5153f99cb7492186af710644a1f2c301.tar.xz
gtest more
-rw-r--r--paludis/comma_separated_dep_parser_TEST.cc31
-rw-r--r--paludis/files.m42
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 e87e95a..394765b 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());
}
diff --git a/paludis/files.m4 b/paludis/files.m4
index 0441c86..2d998ef 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')