[Apt-listbugs-commits] [SCM] apt-listbugs development tree branch, master, updated. apt-listbugs/0.1.5-25-g6d98afc
Francesco Poli (wintermute)
invernomuto at paranoici.org
Sat Dec 24 17:53:59 UTC 2011
The following commit has been merged in the master branch:
commit d42b2be05cc9290c6f60bdab029b6bd512a95be6
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date: Thu Dec 22 00:18:58 2011 +0100
improve comments in test_logic.rb
Having the meaning of method arguments handy, when reading or modifying
tests, should help a bit...
diff --git a/test_logic.rb b/test_logic.rb
index 843fa2a..c2ef649 100755
--- a/test_logic.rb
+++ b/test_logic.rb
@@ -47,7 +47,13 @@ class TC_BugsFactory < Test::Unit::TestCase
Factory::config=nil
end
+ # find_max_version_below_ver()/find_min_version_above_ver() arguments:
+ # * space-delimited sequence of versions
+ # * threshold version
+ # * package name
+
def test_find_max_version_below_ver
+
assert_equal("1.0",
Factory::BugsFactory.find_max_version_below_ver("0.8 1.0 1.5 2.0",
"1.3",
@@ -83,9 +89,11 @@ class TC_BugsFactory < Test::Unit::TestCase
"2.1",
"test"),
"max version below version, all below")
+
end
def test_find_min_version_above_ver
+
assert_equal("1.5",
Factory::BugsFactory.find_min_version_above_ver("0.8 1.0 1.5 2.0",
"1.3",
@@ -121,8 +129,14 @@ class TC_BugsFactory < Test::Unit::TestCase
"0.7",
"test"),
"min version above version, all above")
+
end
+ # am_i_buggy() arguments:
+ # * version under consideration
+ # * space-delimited sequence of fixed versions
+ # * space-delimited sequence of found versions
+
def test_am_i_buggy
# Legend: V version under consideration
# o version where the bug is found
@@ -334,8 +348,17 @@ class TC_BugsFactory < Test::Unit::TestCase
end
+ # bug_is_irrelevant() arguments:
+ # * package name
+ # * currently installed version, if any
+ # * version to be installed or checked, if specified
+ # * bug number
+ # * space-delimited sequence of fixed versions
+ # * space-delimited sequence of found versions
+ # * bug stat (default: "")
+ # N.B.: bug_is_irrelevant() returns true, if the bug can be ignored
+
def test_bug_is_irrelevant
- # bug_is_irrelevant() returns true if the bug can be ignored
assert_equal(true,
Factory::BugsFactory.bug_is_irrelevant("apt-test",
@@ -501,6 +524,7 @@ class TC_BugsFactory_List < Test::Unit::TestCase
end
def test_bug_is_irrelevant_list
+
assert_equal(false,
Factory::BugsFactory.bug_is_irrelevant("apt-test",
nil, "3.1",
--
apt-listbugs development tree
More information about the Apt-listbugs-commits
mailing list