[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 2fb9beec8bc8c1cca40d6781a95d88de81ab2d62
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date: Thu Dec 8 16:39:50 2011 +0100
enhance test_find_min_version_above_ver
More assertions have been added to the test_find_min_version_above_ver
unit test (these are actually the duals of the assertions added to
test_find_max_version_below_ver).
diff --git a/debian/changelog b/debian/changelog
index 7034f34..d38eb51 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,7 +16,7 @@ apt-listbugs (0.1.6) UNRELEASED; urgency=low
currently ignores the "affects" BTS field
* added more assertions to the first test suite
- -- Francesco Poli (wintermute) <invernomuto at paranoici.org> Thu, 08 Dec 2011 16:11:14 +0100
+ -- Francesco Poli (wintermute) <invernomuto at paranoici.org> Thu, 08 Dec 2011 16:37:06 +0100
apt-listbugs (0.1.5) unstable; urgency=low
diff --git a/test_logic.rb b/test_logic.rb
index 17d5f1e..c929ac0 100755
--- a/test_logic.rb
+++ b/test_logic.rb
@@ -84,12 +84,31 @@ class TC_BugsFactory < Test::Unit::TestCase
Factory::BugsFactory.find_min_version_above_ver("0.8 1.0 1.5 2.0",
"1.3",
"test"),
- "min version above version")
+ "min version above version, common case")
+
+ assert_equal("1.5",
+ Factory::BugsFactory.find_min_version_above_ver("1.0 2.0 0.8 1.5",
+ "1.3",
+ "test"),
+ "min version above version, unordered versions")
+
+ assert_equal("1.0",
+ Factory::BugsFactory.find_min_version_above_ver("0.8 1.0 1.5 2.0",
+ "1.0",
+ "test"),
+ "min version above version, exact found")
+
assert_equal(nil,
Factory::BugsFactory.find_min_version_above_ver("0.8 1.0 1.5 2.0",
"2.5",
"test"),
- "min version above version, nil")
+ "min version above version, none above")
+
+ assert_equal("0.8",
+ Factory::BugsFactory.find_min_version_above_ver("0.8 1.0 1.5 2.0",
+ "0.7",
+ "test"),
+ "min version above version, all above")
end
def test_am_i_buggy
--
apt-listbugs development tree
More information about the Apt-listbugs-commits
mailing list