本文整理汇总了C++中TestAccount::connectCharacter方法的典型用法代码示例。如果您正苦于以下问题:C++ TestAccount::connectCharacter方法的具体用法?C++ TestAccount::connectCharacter怎么用?C++ TestAccount::connectCharacter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestAccount
的用法示例。
在下文中一共展示了TestAccount::connectCharacter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test_connectCharacter_entity
void Accountintegration::test_connectCharacter_entity()
{
Entity *e = new Entity("7", 7);
int ret = m_ac->connectCharacter(e);
ASSERT_NOT_EQUAL(ret, 0);
}
示例2: test_connectCharacter_character
void Accountintegration::test_connectCharacter_character()
{
Character * e = new Character("8", 8);
int ret = m_ac->connectCharacter(e);
ASSERT_EQUAL(ret, 0);
ASSERT_NOT_NULL(e->m_externalMind);
ASSERT_TRUE(e->m_externalMind->isLinkedTo(m_c));
}
示例3: main
//.........这里部分代码省略.........
ac->operation(op, res);
Anonymous op_arg;
op->setArgs1(op_arg);
ac->operation(op, res);
op_arg->setId("1");
ac->operation(op, res);
op_arg->setId(chr->getId());
ac->operation(op, res);
}
{
Set op;
OpVector res;
ac->operation(op, res);
op->setArgs1(Root());
ac->operation(op, res);
Anonymous op_arg;
op->setArgs1(op_arg);
ac->operation(op, res);
op_arg->setId("1");
ac->operation(op, res);
op_arg->setId(chr->getId());
ac->operation(op, res);
op_arg->setAttr("guise", "foo");
ac->operation(op, res);
op_arg->setAttr("height", 3.0);
ac->operation(op, res);
BBox newBox(WFMath::Point<3>(-0.5, -0.5, 0.0),
WFMath::Point<3>(-0.5, -0.5, 2.0));
chr->m_location.setBBox(newBox);
op_arg->setAttr("height", 3.0);
ac->operation(op, res);
op_arg->setAttr("tasks", ListType());
ac->operation(op, res);
}
{
Talk op;
OpVector res;
ac->operation(op, res);
op->setArgs1(Root());
ac->operation(op, res);
Anonymous op_arg;
op->setArgs1(op_arg);
ac->operation(op, res);
op_arg->setParents(std::list<std::string>());
ac->operation(op, res);
op->setSerialno(1);
ac->operation(op, res);
op_arg->setLoc("1");
ac->operation(op, res);
}
{
Logout op;
OpVector res;
ac->operation(op, res);
op->setSerialno(1);
ac->operation(op, res);
op->setArgs1(Root());
ac->operation(op, res);
Anonymous op_arg;
op->setArgs1(op_arg);
ac->operation(op, res);
op_arg->setParents(std::list<std::string>());
ac->operation(op, res);
}
{
// Move has no meaning
Move op;
OpVector res;
ac->operation(op, res);
op->setArgs1(Root());
ac->operation(op, res);
Anonymous op_arg;
op->setArgs1(op_arg);
ac->operation(op, res);
op_arg->setParents(std::list<std::string>());
ac->operation(op, res);
}
{
Entity e("7", 7);
int ret = ac->connectCharacter(&e);
assert(ret == -1);
}
{
Character e("8", 8);
int ret = ac->connectCharacter(&e);
assert(ret == 0);
}
delete ac;
return 0;
}