本文整理汇总了C++中MeiElement::printElement方法的典型用法代码示例。如果您正苦于以下问题:C++ MeiElement::printElement方法的具体用法?C++ MeiElement::printElement怎么用?C++ MeiElement::printElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MeiElement
的用法示例。
在下文中一共展示了MeiElement::printElement方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MeiElement
TEST(TestMeiElement, TestPrintElement) {
MeiElement *m = new MeiElement("mei");
MeiElement *music = new MeiElement("music");
MeiElement *body = new MeiElement("body");
MeiElement *staff = new MeiElement("staff");
Note *note = new Note();
Note *note2 = new Note();
MeiDocument *doc = new MeiDocument();
doc->setRootElement(m);
m->addChild(music);
music->addChild(body);
body->addChild(staff);
staff->addChild(note);
staff->addChild(note2);
note->m_NoteVis.setHeadshape("diamond");
note->m_Pitch.setPname("c");
note2->m_Pitch.setPname("d");
m->printElement();
/*
The printElement method does not return anything, so the value of it can't really be tested.
This test simply ensures that it is capable of being called without failing.
So we just assert that everything's OK here if we haven't segfaulted by now.
*/
ASSERT_TRUE(true);
}