void permission_object_t::test<11>() { LLPermissions perm; LLUUID agent; BOOL set = 1; U32 bits = PERM_TRANSFER | PERM_MODIFY; ensure("setBaseBits():failed ", (TRUE == perm.setBaseBits(agent, set, bits))); ensure("setOwnerBits():failed ", (TRUE == perm.setOwnerBits(agent, set, bits))); LLUUID agent1("9c8eca51-53d5-42a7-bb58-cef070395db8"); ensure("setBaseBits():failed ", (FALSE == perm.setBaseBits(agent1, set, bits))); ensure("setOwnerBits():failed ", (FALSE == perm.setOwnerBits(agent1, set, bits))); }
void permission_object_t::test<13>() { LLPermissions perm; LLUUID agent; LLUUID group("9c8eca51-53d5-42a7-bb58-cef070395db8"); U32 bits = 10; ensure("allowOperationBy():failed ", (TRUE == perm.allowOperationBy(bits,agent,group))); LLUUID agent1("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); LLUUID creator("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); LLUUID owner("68edcf47-ccd7-45b8-9f90-1649d7f12806"); LLUUID lastOwner("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); perm.init(creator,owner,lastOwner,group); ensure("allowOperationBy():failed ", (TRUE == perm.allowOperationBy(bits,agent1,group))); }
void permission_object_t::test<12>() { LLPermissions perm; LLUUID agent; LLUUID group("9c8eca51-53d5-42a7-bb58-cef070395db8"); BOOL set = 1; U32 bits = 10; ensure("setGroupBits():failed ", (TRUE == perm.setGroupBits(agent,group, set, bits))); ensure("setEveryoneBits():failed ", (TRUE == perm.setEveryoneBits(agent,group, set, bits))); ensure("setNextOwnerBits():failed ", (TRUE == perm.setNextOwnerBits(agent,group, set, bits))); LLUUID agent1("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); ensure("setGroupBits():failed ", (FALSE == perm.setGroupBits(agent1,group, set, bits))); ensure("setEveryoneBits():failed ", (FALSE == perm.setEveryoneBits(agent1,group, set, bits))); ensure("setNextOwnerBits():failed ", (FALSE == perm.setNextOwnerBits(agent1,group, set, bits))); }
void permission_object_t::test<16>() { LLPermissions perm; LLUUID creator("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); LLUUID owner; LLUUID lastOwner("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); LLUUID group("9c8eca51-53d5-42a7-bb58-cef070395db8"); perm.init(creator,owner,lastOwner,group); LLUUID agent; ensure("1:allowMoveBy():failed ", perm.allowMoveBy(agent)); ensure("2:allowMoveBy():failed ", perm.allowMoveBy(agent,group)); LLUUID agent1("9c8eca51-53d5-42a7-bb58-cef070395db8"); ensure("3:allowMoveBy():failed ", perm.allowMoveBy(agent1)); ensure("4:allowMoveBy():failed ", perm.allowMoveBy(agent1,group)); }
void RepastHPCDemoModel::moveAgents(){ int rank = repast::RepastProcess::instance()->rank(); if(rank == 0){ repast::AgentId agent0(0, 0, 0); repast::AgentId agent1(1, 0, 0); repast::AgentId agent2(2, 0, 0); repast::AgentId agent3(3, 0, 0); repast::AgentId agent4(4, 0, 0); repast::RepastProcess::instance()->moveAgent(agent0, 1); repast::RepastProcess::instance()->moveAgent(agent1, 2); repast::RepastProcess::instance()->moveAgent(agent2, 3); repast::RepastProcess::instance()->moveAgent(agent3, 3); repast::RepastProcess::instance()->moveAgent(agent4, 1); } repast::RepastProcess::instance()->synchronizeAgentStatus<RepastHPCDemoAgent, RepastHPCDemoAgentPackage, RepastHPCDemoAgentPackageProvider, RepastHPCDemoAgentPackageReceiver>(context, *provider, *receiver, *receiver); }
void permission_object_t::test<15>() { LLPermissions perm; LLUUID creator("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); LLUUID owner; LLUUID lastOwner("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); LLUUID group("9c8eca51-53d5-42a7-bb58-cef070395db8"); perm.init(creator,owner,lastOwner,group); LLUUID agent; ensure("1:allowCopyBy():failed ", (TRUE == perm.allowModifyBy(agent))); ensure("2:allowCopyBy():failed ", (TRUE == perm.allowModifyBy(agent,group))); U32 val1 = 0x7FFFFFFF; S32 sVal = 1 << 15; sVal = val1 & sVal; LLUUID agent1("9c8eca51-53d5-42a7-bb58-cef070395db8"); ensure("3:allowCopyBy():failed ", (sVal == perm.allowCopyBy(agent1))); ensure("4:allowCopyBy():failed ", (sVal == perm.allowCopyBy(agent1,group))); }