aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-05-18 22:08:37 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-05-18 22:08:37 +0000
commit6dfdd147bc1d25802ca5283abb23a09cf8bfa827 (patch)
tree5c7e4fa03ba16892c5a91abfa5658503bad78dbe
parent96cefedfc001ccd6258a87be477b675b9a98f70f (diff)
downloadpaludis-6dfdd147bc1d25802ca5283abb23a09cf8bfa827.tar.gz
paludis-6dfdd147bc1d25802ca5283abb23a09cf8bfa827.tar.xz
Check tilde comparison behaviour
-rw-r--r--paludis/version_spec_TEST.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/paludis/version_spec_TEST.cc b/paludis/version_spec_TEST.cc
index da974df..46a28b6 100644
--- a/paludis/version_spec_TEST.cc
+++ b/paludis/version_spec_TEST.cc
@@ -141,6 +141,24 @@ namespace test_cases
} test_version_spec_star_compare;
/**
+ * \test VersionSpec tilde comparisons
+ *
+ * \ingroup grptestcases
+ */
+ struct VersionSpecTildeCompareTest : TestCase
+ {
+ VersionSpecTildeCompareTest() : TestCase("version spec tilde compare") {}
+
+ void run()
+ {
+ TEST_CHECK(VersionSpec("1.2").tilde_compare(VersionSpec("1.2")));
+ TEST_CHECK(VersionSpec("1.2").tilde_compare(VersionSpec("1.2-r1")));
+ TEST_CHECK(! VersionSpec("1.2").tilde_compare(VersionSpec("1.3")));
+ TEST_CHECK(VersionSpec("1.2-r1").tilde_compare(VersionSpec("1.2-r2")));
+ }
+ } test_version_spec_tilde_compare;
+
+ /**
* \test VersionSpec remove revision
*
* \ingroup grptestcases