aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2009-03-22 11:14:28 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2009-03-22 20:16:43 +0000
commit4d3c6ba27de87d60b57a068db87c7e4fe39b32df (patch)
tree4e30f7737474c596ad68dfc44df7756a54c738b0
parent802f09740ff2df84da1ed106811ef6faad6edf10 (diff)
downloadpaludis-4d3c6ba27de87d60b57a068db87c7e4fe39b32df.tar.gz
paludis-4d3c6ba27de87d60b57a068db87c7e4fe39b32df.tar.xz
More tilde_compare tests
-rw-r--r--paludis/version_spec_TEST.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/paludis/version_spec_TEST.cc b/paludis/version_spec_TEST.cc
index 78851c0..30be045 100644
--- a/paludis/version_spec_TEST.cc
+++ b/paludis/version_spec_TEST.cc
@@ -182,6 +182,22 @@ namespace test_cases
TEST_CHECK(! VersionSpec("1.2-r1.3", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r2", VersionSpecOptions())));
TEST_CHECK(! VersionSpec("1.2-r2", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r2.3", VersionSpecOptions())));
TEST_CHECK(VersionSpec("1.2-r2.4", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r2.3", VersionSpecOptions())));
+
+ TEST_CHECK(VersionSpec("1.2-r0", VersionSpecOptions()).tilde_compare(VersionSpec("1.2", VersionSpecOptions())));
+ TEST_CHECK(VersionSpec("1.2", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r0", VersionSpecOptions())));
+ TEST_CHECK(VersionSpec("1.2-r1", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r0", VersionSpecOptions())));
+ TEST_CHECK(! VersionSpec("1.2-r0", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r1", VersionSpecOptions())));
+ TEST_CHECK(VersionSpec("1.2-r0.0", VersionSpecOptions()).tilde_compare(VersionSpec("1.2", VersionSpecOptions())));
+ TEST_CHECK(VersionSpec("1.2", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r0.0", VersionSpecOptions())));
+ TEST_CHECK(VersionSpec("1.2-r0.0", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r0", VersionSpecOptions())));
+ TEST_CHECK(VersionSpec("1.2-r0", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r0.0", VersionSpecOptions())));
+ TEST_CHECK(VersionSpec("1.2-r0.1", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r0", VersionSpecOptions())));
+ TEST_CHECK(! VersionSpec("1.2-r0", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r0.1", VersionSpecOptions())));
+ TEST_CHECK(VersionSpec("1.2-r1", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r0.1", VersionSpecOptions())));
+ TEST_CHECK(! VersionSpec("1.2-r0.1", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r1", VersionSpecOptions())));
+
+ TEST_CHECK(! VersionSpec("1.2.3", VersionSpecOptions()).tilde_compare(VersionSpec("1.2-r3", VersionSpecOptions())));
+ TEST_CHECK(! VersionSpec("1.2-r3", VersionSpecOptions()).tilde_compare(VersionSpec("1.2.3", VersionSpecOptions())));
}
} test_version_spec_tilde_compare;