[Apt-listbugs-commits] [SCM] apt-listbugs development tree branch, master, updated. apt-listbugs/0.1.5-21-gca683b2
Francesco Poli (wintermute)
invernomuto at paranoici.org
Sat Dec 10 17:02:47 UTC 2011
The following commit has been merged in the master branch:
commit ddd6d0c7675a53326216a85b5fb75d13eb748303
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date: Thu Dec 8 16:17:37 2011 +0100
enhance test_find_max_version_below_ver
More assertions have been added to the test_find_max_version_below_ver
unit test.
diff --git a/debian/changelog b/debian/changelog
index 56ca323..7034f34 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,8 +14,9 @@ apt-listbugs (0.1.6) UNRELEASED; urgency=low
work without access to any X display)
* updated README.Debian file: added an explanation of why apt-listbugs
currently ignores the "affects" BTS field
+ * added more assertions to the first test suite
- -- Francesco Poli (wintermute) <invernomuto at paranoici.org> Sun, 30 Oct 2011 23:53:30 +0100
+ -- Francesco Poli (wintermute) <invernomuto at paranoici.org> Thu, 08 Dec 2011 16:11:14 +0100
apt-listbugs (0.1.5) unstable; urgency=low
diff --git a/test_logic.rb b/test_logic.rb
index 23009e6..17d5f1e 100755
--- a/test_logic.rb
+++ b/test_logic.rb
@@ -3,6 +3,7 @@
# test_logic: perform unit tests on apt-listbugs/logic
#
# Copyright (C) 2008 Junichi Uekawa <dancer at debian.org>
+# Copyright (C) 2011 Francesco Poli <invernomuto at paranoici.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -51,13 +52,31 @@ class TC_BugsFactory < Test::Unit::TestCase
Factory::BugsFactory.find_max_version_below_ver("0.8 1.0 1.5 2.0",
"1.3",
"test"),
- "max version below version")
+ "max version below version, common case")
+
+ assert_equal("1.0",
+ Factory::BugsFactory.find_max_version_below_ver("1.0 2.0 0.8 1.5",
+ "1.3",
+ "test"),
+ "max version below version, unordered versions")
+
+ assert_equal("1.5",
+ Factory::BugsFactory.find_max_version_below_ver("0.8 1.0 1.5 2.0",
+ "1.5",
+ "test"),
+ "max version below version, exact found")
assert_equal(nil,
Factory::BugsFactory.find_max_version_below_ver("0.8 1.0 1.5 2.0",
"0.5",
"test"),
- "max version below version, nil")
+ "max version below version, none below")
+
+ assert_equal("2.0",
+ Factory::BugsFactory.find_max_version_below_ver("0.8 1.0 1.5 2.0",
+ "2.1",
+ "test"),
+ "max version below version, all below")
end
def test_find_min_version_above_ver
--
apt-listbugs development tree
More information about the Apt-listbugs-commits
mailing list