14 #include <cppunit/TestFixture.h>
15 #include <cppunit/extensions/HelperMacros.h>
17 #include "ReuserState.hpp"
18 #include "ReuserTypes.hpp"
26 CPPUNIT_TEST_SUITE_END();
38 CPPUNIT_ASSERT_EQUAL(42, state.getAgentId());
40 CPPUNIT_ASSERT_EQUAL(99, state.getAgentId());
53 CPPUNIT_ASSERT((REUSE_ENHANCED & REUSE_MAIN) == 0);
54 CPPUNIT_ASSERT((REUSE_ENHANCED & REUSE_CONF) == 0);
55 CPPUNIT_ASSERT((REUSE_ENHANCED & REUSE_COPYRIGHT) == 0);
56 CPPUNIT_ASSERT((REUSE_MAIN & REUSE_CONF) == 0);
57 CPPUNIT_ASSERT((REUSE_MAIN & REUSE_COPYRIGHT) == 0);
58 CPPUNIT_ASSERT((REUSE_CONF & REUSE_COPYRIGHT) == 0);
61 int combined = REUSE_ENHANCED | REUSE_MAIN | REUSE_CONF | REUSE_COPYRIGHT;
62 CPPUNIT_ASSERT((combined & REUSE_ENHANCED) != 0);
63 CPPUNIT_ASSERT((combined & REUSE_MAIN) != 0);
64 CPPUNIT_ASSERT((combined & REUSE_CONF) != 0);
65 CPPUNIT_ASSERT((combined & REUSE_COPYRIGHT) != 0);
78 CPPUNIT_ASSERT_EQUAL(0, b.uploadtree_pk);
79 CPPUNIT_ASSERT_EQUAL(0, b.lft);
80 CPPUNIT_ASSERT_EQUAL(0, b.rgt);
81 CPPUNIT_ASSERT_EQUAL(0, b.upload_fk);
Holds the runtime state of the reuser agent (agent id).
void testReuseModeFlags()
Reuse mode flag constants are distinct and combine correctly.
void testReuserStateMutation()
ReuserState stores and mutates the agent id correctly.
void testItemTreeBoundsDefaults()
ItemTreeBounds is zero-initialised when value-initialised.
Bounds of an item within an uploadtree table.