aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-01 20:46:19 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-04 08:32:59 +0100
commitf0df32fb13ae4f2d9e78fa914a374da252a3ee52 (patch)
tree54a92161b748e3303981a7b07c87becba5d4df1d
parent02580d1bd7f77deff3f3786cc9a9503e25be8032 (diff)
downloadpaludis-f0df32fb13ae4f2d9e78fa914a374da252a3ee52.tar.gz
paludis-f0df32fb13ae4f2d9e78fa914a374da252a3ee52.tar.xz
Use asserts for pointer checks
-rw-r--r--paludis/user_dep_spec_TEST.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/paludis/user_dep_spec_TEST.cc b/paludis/user_dep_spec_TEST.cc
index d266be6..2fa1e6e 100644
--- a/paludis/user_dep_spec_TEST.cc
+++ b/paludis/user_dep_spec_TEST.cc
@@ -94,7 +94,7 @@ UserDepSpecTest::check_spec(
EXPECT_TRUE(! spec.package_name_constraint());
else
{
- EXPECT_TRUE(bool(spec.package_name_constraint()));
+ ASSERT_TRUE(bool(spec.package_name_constraint()));
EXPECT_EQ(package, stringify(spec.package_name_constraint()->name()));
}
@@ -102,7 +102,7 @@ UserDepSpecTest::check_spec(
EXPECT_TRUE(! spec.category_name_part_constraint());
else
{
- EXPECT_TRUE(bool(spec.category_name_part_constraint()));
+ ASSERT_TRUE(bool(spec.category_name_part_constraint()));
EXPECT_EQ(category_name_part, stringify(spec.category_name_part_constraint()->name_part()));
}
@@ -110,7 +110,7 @@ UserDepSpecTest::check_spec(
EXPECT_TRUE(! spec.package_name_part_constraint());
else
{
- EXPECT_TRUE(bool(spec.package_name_part_constraint()));
+ ASSERT_TRUE(bool(spec.package_name_part_constraint()));
EXPECT_EQ(package_name_part, stringify(spec.package_name_part_constraint()->name_part()));
}
@@ -121,7 +121,7 @@ UserDepSpecTest::check_spec(
EXPECT_TRUE((! spec.version_requirements_ptr()) || spec.version_requirements_ptr()->empty());
else
{
- EXPECT_TRUE(bool(spec.version_requirements_ptr()));
+ ASSERT_TRUE(bool(spec.version_requirements_ptr()));
EXPECT_EQ(version_requirements, stringify(join(
spec.version_requirements_ptr()->begin(), spec.version_requirements_ptr()->end(), ", ", &dump_version_requirement)));
}
@@ -130,7 +130,7 @@ UserDepSpecTest::check_spec(
EXPECT_TRUE(! spec.exact_slot_constraint());
else
{
- EXPECT_TRUE(bool(spec.exact_slot_constraint()));
+ ASSERT_TRUE(bool(spec.exact_slot_constraint()));
EXPECT_EQ(slot_requirement, ":" + stringify(spec.exact_slot_constraint()->name()));
}
@@ -138,7 +138,7 @@ UserDepSpecTest::check_spec(
EXPECT_TRUE(! spec.from_repository_constraint());
else
{
- EXPECT_TRUE(bool(spec.from_repository_constraint()));
+ ASSERT_TRUE(bool(spec.from_repository_constraint()));
EXPECT_EQ(from_repository, stringify(spec.from_repository_constraint()->name()));
}
@@ -146,7 +146,7 @@ UserDepSpecTest::check_spec(
EXPECT_TRUE(! spec.in_repository_constraint());
else
{
- EXPECT_TRUE(bool(spec.in_repository_constraint()));
+ ASSERT_TRUE(bool(spec.in_repository_constraint()));
EXPECT_EQ(in_repository, stringify(spec.in_repository_constraint()->name()));
}
@@ -154,7 +154,7 @@ UserDepSpecTest::check_spec(
EXPECT_TRUE((! spec.additional_requirements_ptr()) || spec.additional_requirements_ptr()->empty());
else
{
- EXPECT_TRUE(bool(spec.additional_requirements_ptr()));
+ ASSERT_TRUE(bool(spec.additional_requirements_ptr()));
EXPECT_EQ(additional_requirement, stringify(join(
indirect_iterator(spec.additional_requirements_ptr()->begin()),
indirect_iterator(spec.additional_requirements_ptr()->end()), ", ")));
@@ -164,7 +164,7 @@ UserDepSpecTest::check_spec(
EXPECT_TRUE(! spec.installed_at_path_constraint());
else
{
- EXPECT_TRUE(bool(spec.installed_at_path_constraint()));
+ ASSERT_TRUE(bool(spec.installed_at_path_constraint()));
EXPECT_EQ(installed_at_path, stringify(spec.installed_at_path_constraint()->path()));
}
@@ -172,7 +172,7 @@ UserDepSpecTest::check_spec(
EXPECT_TRUE(! spec.installable_to_path_constraint());
else
{
- EXPECT_TRUE(bool(spec.installable_to_path_constraint()));
+ ASSERT_TRUE(bool(spec.installable_to_path_constraint()));
EXPECT_EQ(installable_to_path_f, stringify(spec.installable_to_path_constraint()->path()));
EXPECT_EQ(installable_to_path_s, spec.installable_to_path_constraint()->include_masked());
}