本文整理汇总了C++中Admin::addToMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ Admin::addToMessage方法的具体用法?C++ Admin::addToMessage怎么用?C++ Admin::addToMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin
的用法示例。
在下文中一共展示了Admin::addToMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test_addToMessage
void Admintest::test_addToMessage()
{
MapType data;
m_account->addToMessage(data);
ASSERT_NOT_EQUAL(data.find("character_types"), data.end());
ASSERT_EQUAL(data["character_types"], ListType());
}
示例2: test_addToMessage_tree
void Admintest::test_addToMessage_tree()
{
Inheritance::instance().addChild(atlasClass("character", "root"));
Inheritance::instance().addChild(atlasClass("human", "character"));
Inheritance::instance().addChild(atlasClass("settler", "human"));
Inheritance::instance().addChild(atlasClass("goblin", "character"));
MapType data;
m_account->addToMessage(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");
// FIXME How do we know this order is consistent
ASSERT_NOT_EQUAL(data.find("character_types"), data.end());
ASSERT_EQUAL(data["character_types"], expected_character_types);
}