aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/fake/dep_parser_TEST.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-25 11:02:04 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-25 16:55:34 +0000
commit696a370f93de32f8fbb115c84733595e96ede8b4 (patch)
tree829346d77b6985afb6ae7390bfe35f8f2ce87df0 /paludis/repositories/fake/dep_parser_TEST.cc
parentc225b90e67f8bc211cb738558f6d57427089e3f6 (diff)
downloadpaludis-696a370f93de32f8fbb115c84733595e96ede8b4.tar.gz
paludis-696a370f93de32f8fbb115c84733595e96ede8b4.tar.xz
gtest more
Diffstat (limited to 'paludis/repositories/fake/dep_parser_TEST.cc')
-rw-r--r--paludis/repositories/fake/dep_parser_TEST.cc29
1 files changed, 12 insertions, 17 deletions
diff --git a/paludis/repositories/fake/dep_parser_TEST.cc b/paludis/repositories/fake/dep_parser_TEST.cc
index 2d216df53..08b34163e 100644
--- a/paludis/repositories/fake/dep_parser_TEST.cc
+++ b/paludis/repositories/fake/dep_parser_TEST.cc
@@ -18,16 +18,19 @@
*/
#include <paludis/repositories/fake/dep_parser.hh>
+
#include <paludis/environments/test/test_environment.hh>
+
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/accept_visitor.hh>
-#include <test/test_runner.hh>
-#include <test/test_framework.hh>
+#include <paludis/util/stringify.hh>
+
#include <sstream>
#include <algorithm>
+#include <gtest/gtest.h>
+
using namespace paludis;
-using namespace test;
namespace
{
@@ -78,21 +81,13 @@ namespace
};
}
-namespace test_cases
+TEST(DepParser, Works)
{
- struct DepParserTest : TestCase
- {
- DepParserTest() : TestCase("dep parser") { }
-
- void run()
- {
- TestEnvironment env;
- std::shared_ptr<DependencySpecTree> d(fakerepository::parse_depend("( ( a/a b/b ) )", &env));
+ TestEnvironment env;
+ std::shared_ptr<DependencySpecTree> d(fakerepository::parse_depend("( ( a/a b/b ) )", &env));
- QuickPrinter p;
- d->top()->accept(p);
- TEST_CHECK_EQUAL(p.str.str(), "all<all<all<p<a/a>p<b/b>>>>");
- }
- } dep_parser_test;
+ QuickPrinter p;
+ d->top()->accept(p);
+ EXPECT_EQ("all<all<all<p<a/a>p<b/b>>>>", p.str.str());
}