aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-12 21:36:00 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-12 21:36:00 +0000
commit4c76fbebb33732a5e63f122f859dc93bcd17964a (patch)
tree3b9bfd58c3b06ddde9be316a2087787460e4dfa7
parent05b8120f09857df7d6718c6e3390782f28da381c (diff)
downloadpaludis-4c76fbebb33732a5e63f122f859dc93bcd17964a.tar.gz
paludis-4c76fbebb33732a5e63f122f859dc93bcd17964a.tar.xz
Extend version spec test coverage slightly
-rw-r--r--paludis/version_spec_TEST.cc38
1 files changed, 36 insertions, 2 deletions
diff --git a/paludis/version_spec_TEST.cc b/paludis/version_spec_TEST.cc
index 3a11ce3..7a6c789 100644
--- a/paludis/version_spec_TEST.cc
+++ b/paludis/version_spec_TEST.cc
@@ -127,8 +127,7 @@ namespace test_cases
{
TEST_CHECK(VersionSpec("1") < VersionSpec("2"));
TEST_CHECK(VersionSpec("3.10g") < VersionSpec("3.10.18"));
- TEST_CHECK(VersionSpec("4.0.2_pre20051120") <
- VersionSpec("4.0.2_pre20051223"));
+ TEST_CHECK(VersionSpec("4.0.2_pre20051120") < VersionSpec("4.0.2_pre20051223"));
TEST_CHECK(VersionSpec("1_alpha") < VersionSpec("1_beta"));
TEST_CHECK(VersionSpec("1_beta") < VersionSpec("1_pre"));
TEST_CHECK(VersionSpec("1_rc") < VersionSpec("1"));
@@ -138,6 +137,41 @@ namespace test_cases
TEST_CHECK(VersionSpec("1_rc3") < VersionSpec("1"));
TEST_CHECK(VersionSpec("1") < VersionSpec("1_p2"));
+ TEST_CHECK(! (VersionSpec("1") > VersionSpec("2")));
+ TEST_CHECK(! (VersionSpec("3.10g") > VersionSpec("3.10.18")));
+ TEST_CHECK(! (VersionSpec("4.0.2_pre20051120") > VersionSpec("4.0.2_pre20051223")));
+ TEST_CHECK(! (VersionSpec("1_alpha") > VersionSpec("1_beta")));
+ TEST_CHECK(! (VersionSpec("1_beta") > VersionSpec("1_pre")));
+ TEST_CHECK(! (VersionSpec("1_rc") > VersionSpec("1")));
+ TEST_CHECK(! (VersionSpec("1") > VersionSpec("1_p0")));
+ TEST_CHECK(! (VersionSpec("1_alpha2") > VersionSpec("1_beta1")));
+ TEST_CHECK(! (VersionSpec("1_beta2") > VersionSpec("1_pre1")));
+ TEST_CHECK(! (VersionSpec("1_rc3") > VersionSpec("1")));
+ TEST_CHECK(! (VersionSpec("1") > VersionSpec("1_p2")));
+
+ TEST_CHECK(VersionSpec("2") > VersionSpec("1"));
+ TEST_CHECK(VersionSpec("3.10.18") > VersionSpec("3.10g"));
+ TEST_CHECK(VersionSpec("4.0.2_pre20051223") > VersionSpec("4.0.2_pre20051120"));
+ TEST_CHECK(VersionSpec("1_beta") > VersionSpec("1_alpha"));
+ TEST_CHECK(VersionSpec("1_pre") > VersionSpec("1_beta"));
+ TEST_CHECK(VersionSpec("1") > VersionSpec("1_rc"));
+ TEST_CHECK(VersionSpec("1_p0") > VersionSpec("1"));
+ TEST_CHECK(VersionSpec("1_beta1") > VersionSpec("1_alpha2"));
+ TEST_CHECK(VersionSpec("1_pre1") > VersionSpec("1_beta2"));
+ TEST_CHECK(VersionSpec("1") > VersionSpec("1_rc3"));
+ TEST_CHECK(VersionSpec("1_p2") > VersionSpec("1"));
+
+ TEST_CHECK(! (VersionSpec("2") < VersionSpec("1")));
+ TEST_CHECK(! (VersionSpec("3.10.18") < VersionSpec("3.10g")));
+ TEST_CHECK(! (VersionSpec("4.0.2_pre20051223") < VersionSpec("4.0.2_pre20051120")));
+ TEST_CHECK(! (VersionSpec("1_beta") < VersionSpec("1_alpha")));
+ TEST_CHECK(! (VersionSpec("1_pre") < VersionSpec("1_beta")));
+ TEST_CHECK(! (VersionSpec("1") < VersionSpec("1_rc")));
+ TEST_CHECK(! (VersionSpec("1_p0") < VersionSpec("1")));
+ TEST_CHECK(! (VersionSpec("1_beta1") < VersionSpec("1_alpha2")));
+ TEST_CHECK(! (VersionSpec("1_pre1") < VersionSpec("1_beta2")));
+ TEST_CHECK(! (VersionSpec("1") < VersionSpec("1_rc3")));
+ TEST_CHECK(! (VersionSpec("1_p2") < VersionSpec("1")));
}
} test_version_spec_compare;