本文整理汇总了C++中Admin::addToEntity方法的典型用法代码示例。如果您正苦于以下问题:C++ Admin::addToEntity方法的具体用法?C++ Admin::addToEntity怎么用?C++ Admin::addToEntity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin
的用法示例。
在下文中一共展示了Admin::addToEntity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test_addToEntity_tree
void Admintest::test_addToEntity_tree()
{
Anonymous data;
m_account->addToEntity(data);
ASSERT_TRUE(data->hasAttr("character_types"));
ASSERT_EQUAL(data->getAttr("character_types"), ListType());
}
示例2: test_addToEntity
void Admintest::test_addToEntity()
{
Inheritance::instance().addChild(atlasClass("character", "root"));
Inheritance::instance().addChild(atlasClass("human", "character"));
Inheritance::instance().addChild(atlasClass("settler", "human"));
Inheritance::instance().addChild(atlasClass("goblin", "character"));
Anonymous data;
m_account->addToEntity(data);
ListType expected_character_types;
expected_character_types.push_back("character");
expected_character_types.push_back("human");
expected_character_types.push_back("settler");
expected_character_types.push_back("goblin");
ASSERT_TRUE(data->hasAttr("character_types"));
ASSERT_EQUAL(data->getAttr("character_types"),
expected_character_types);
}