// I__s_(8)candidate-1-1.i586(@System)(openSUSE)
// } (A 6) {
// U__s_(2)candidate-4-1.x86_64(RepoHIGH)(unkown)
- // U__s_(3)candidate-4-1.i586(RepoHIGH)(unkown)
+ // U__s_(3)candidate-4-1.i586(RepoHIGH)(unkown) <- (update) candidate if allowVendorChange
// U__s_(6)candidate-0-1.x86_64(RepoMID)(SUSE)
// U__s_(7)candidate-0-1.i586(RepoMID)(SUSE) <- candidate (highest prio matching arch and vendor)
// U__s_(4)candidate-2-1.x86_64(RepoLOW)(openSUSE)
// U__s_(5)candidate-2-1.i586(RepoLOW)(openSUSE)
// }
- BOOST_CHECK_EQUAL( s->candidateObj()->repoInfo().alias(), "RepoMID" );
- BOOST_CHECK_EQUAL( s->candidateObj()->edition(), Edition("0-1") );
- BOOST_CHECK_EQUAL( s->candidateObj()->arch(), Arch_i586 );
- // no updateCandidate due to low version
- BOOST_CHECK_EQUAL( s->updateCandidateObj(), PoolItem() );
+ if ( ZConfig::instance().solver_allowVendorChange() )
+ {
+ BOOST_CHECK_EQUAL( s->candidateObj()->repoInfo().alias(), "RepoHIGH" );
+ BOOST_CHECK_EQUAL( s->candidateObj()->edition(), Edition("4-1") );
+ BOOST_CHECK_EQUAL( s->candidateObj()->arch(), Arch_i586 );
+ // updateCandidate:
+ BOOST_CHECK_EQUAL( s->updateCandidateObj(), s->candidateObj() );
+ }
+ else
+ {
+ BOOST_CHECK_EQUAL( s->candidateObj()->repoInfo().alias(), "RepoMID" );
+ BOOST_CHECK_EQUAL( s->candidateObj()->edition(), Edition("0-1") );
+ BOOST_CHECK_EQUAL( s->candidateObj()->arch(), Arch_i586 );
+ // no updateCandidate due to low version
+ BOOST_CHECK_EQUAL( s->updateCandidateObj(), PoolItem() );
+ }
}
BOOST_AUTO_TEST_CASE(candiadatenoarch)