summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-01-17 13:54:33 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-01-17 14:18:02 +0200
commit12183024fd6bce3b06f1fab843dd8781dd35e036 (patch)
treea621ec7b65d37f011b15d22612df119404ee21be /test
parent60ee61162053054bb4abe7e0260734fd53532401 (diff)
downloadapk-tools-12183024fd6bce3b06f1fab843dd8781dd35e036.tar.gz
apk-tools-12183024fd6bce3b06f1fab843dd8781dd35e036.tar.bz2
apk-tools-12183024fd6bce3b06f1fab843dd8781dd35e036.tar.xz
apk-tools-12183024fd6bce3b06f1fab843dd8781dd35e036.zip
solver: calculate branch minimum penalty early
Previously we would cache the penalty when evaluating the final solution, and adding that until we backtrack to first topology position changing that penalty. However, we can just keep track of minimum penalty based on name state, and add it. This allows us to bail out early on bad branches because we know in advance how things will turn out.
Diffstat (limited to 'test')
-rw-r--r--test/error2.expect3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/error2.expect b/test/error2.expect
index 7faac5e..65d0093 100644
--- a/test/error2.expect
+++ b/test/error2.expect
@@ -1,2 +1,3 @@
-1 unsatisfiable dependencies (solution with 4 names)
+2 unsatisfiable dependencies (solution with 4 names)
world: d<1.5
+b-1: d<2.0