[gst-cvs] gstreamer: check: Fix version check tests
Jan Schmidt
thaytan at kemper.freedesktop.org
Fri Sep 11 12:46:53 PDT 2009
Module: gstreamer
Branch: master
Commit: 057afdd5cd58982226646e21ecb780c41e2424ad
URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=057afdd5cd58982226646e21ecb780c41e2424ad
Author: Jan Schmidt <thaytan at noraisin.net>
Date: Fri Sep 11 18:24:18 2009 +0100
check: Fix version check tests
Accomodate the slightly changed semantics in the plugin version check
where a CVS version just before a release is acceptable.
---
tests/check/gst/gstplugin.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/tests/check/gst/gstplugin.c b/tests/check/gst/gstplugin.c
index 3ca5680..18a56a1 100644
--- a/tests/check/gst/gstplugin.c
+++ b/tests/check/gst/gstplugin.c
@@ -327,9 +327,17 @@ GST_START_TEST (test_version_checks)
GST_VERSION_MAJOR, GST_VERSION_MINOR + 1, GST_VERSION_MICRO) == TRUE,
"Unexpected version check result");
- fail_if (gst_default_registry_check_feature_version ("identity",
- GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO + 1) == TRUE,
- "Unexpected version check result");
+ /* If the nano is set, then we expect that X.Y.Z-1.x >= X.Y.Z, so that a
+ * devel plugin is valid against an upcoming release */
+ if (GST_VERSION_NANO > 0) {
+ fail_unless (gst_default_registry_check_feature_version ("identity",
+ GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO + 1) ==
+ TRUE, "Unexpected version check result");
+ } else {
+ fail_if (gst_default_registry_check_feature_version ("identity",
+ GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO + 1) ==
+ TRUE, "Unexpected version check result");
+ }
if (GST_VERSION_MAJOR > 0) {
fail_if (gst_default_registry_check_feature_version ("identity",
More information about the Gstreamer-commits
mailing list