31 using namespace ept::popcon;
32 using namespace ept::apt;
45 : odsd( TEST_ENV_DIR
"popcon" ),
46 odid( TEST_ENV_DIR
"popcon" ),
47 odusd( TEST_ENV_DIR
"popcon" ),
48 oduid( TEST_ENV_DIR
"popcon" )
53 assert_eq(popcon.submissions(), 52024);
54 assert(popcon.size() > 0);
55 assert(popcon.score(0) > 0);
56 assert(!popcon.name(0).empty());
62 for (
size_t i = 0; i < popcon.size(); ++i)
65 assert(popcon.score(i) > 0);
75 float score = popcon.score(*i);
86 assert(popcon[
"apt"] > popcon[
"libapt-pkg-dev"]);
102 assert(empty.
size() == 0);
103 assert(empty.
score(
"apt") == 0.0);
Definition: popcon.test.h:34
Apt apt
Definition: popcon.test.h:41
Definition: popcon/maint/path.h:66
popcon::Path::OverridePopconUserSourceDir odusd
Definition: popcon.test.h:38
Definition: popcon/maint/path.h:96
TestPopcon()
Definition: popcon.test.h:44
size_t submissions() const
Return the total number of popcon submissions.
Definition: popcon.h:102
Maps Packages to IDs and vice-versa.
Definition: popcon.h:72
size_t size() const
Get the number of packages in the index.
Definition: popcon.h:105
Test haveScores()
Definition: popcon.test.h:70
popcon::Path::OverridePopconUserIndexDir oduid
Definition: popcon.test.h:39
popcon::Path::OverridePopconSourceDir odsd
Definition: popcon.test.h:36
Definition: popcon/maint/path.h:86
High-level access to the Apt cache, as a data provider for the ept framework.
Definition: apt/apt.h:60
Test fallbackValues()
Definition: popcon.test.h:90
bool hasData() const
Return true if this data source has data, false if it's empty.
Definition: popcon.h:99
High-level front-end to libapt-pkg, as a data provider for the ept framework.
float score(size_t idx) const
Get the score by index.
Definition: popcon.h:137
time_t timestamp() const
Get the timestamp of when the index was last updated.
Definition: popcon.h:96
Test validScores()
Definition: popcon.test.h:84
Definition: popcon/maint/path.h:76
Test accessibility()
Definition: popcon.test.h:60
Popcon popcon
Definition: popcon.test.h:42
Test basicAccess()
Definition: popcon.test.h:51
popcon::Path::OverridePopconIndexDir odid
Definition: popcon.test.h:37