本文整理汇总了C++中Doc::getTxtDocu方法的典型用法代码示例。如果您正苦于以下问题:C++ Doc::getTxtDocu方法的具体用法?C++ Doc::getTxtDocu怎么用?C++ Doc::getTxtDocu使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doc
的用法示例。
在下文中一共展示了Doc::getTxtDocu方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
LTest::addTest("GeneratorTest", [](){
Generator<parts::Body, parts::ElectroEngine, parts::ManuelTransmission, parts::CarClassification, parts::AutoPilot> car;
return true;
});
LTest::addTest("containsPart() inBound", [](){
using Gen = Generator<parts::Body, parts::GasEngine>;
LTAssert::True(Gen::containsPart<parts::Body>());
LTAssert::True(Gen::containsPart<parts::GasEngine>());
LTAssert::False(Gen::containsPart<parts::AutomaticTransmission>());
return true;
});
LTest::addTest("containsPart() Border (one part)", [](){
using Gen = Generator<parts::Body>;
LTAssert::True(Gen::containsPart<parts::Body>());
LTAssert::False(Gen::containsPart<parts::GasEngine>());
LTAssert::False(Gen::containsPart<parts::AutomaticTransmission>());
return true;
});
LTest::addTest("containsPart() Border (zero parts)", [](){
using Gen = Generator<>;
LTAssert::False(Gen::containsPart<parts::Body>());
LTAssert::False(Gen::containsPart<parts::GasEngine>());
LTAssert::False(Gen::containsPart<parts::AutomaticTransmission>());
return true;
});
//containsDerivedPart Tests
LTest::addTest("containsDerivedPart() 1", [](){
using Gen = Generator<parts::AutomaticTransmission>;
LTAssert::False(Gen::containsPart<parts::Engine>());
LTAssert::True(Gen::containsPart<parts::Transmission>());
return true;
});
LTest::addTest("DSL1", [](){
using Gen = DSL<EcoLine>;
Gen test;
return true;
});
LTest::addTest("DSL2", [](){
using Gen= typename DSL<EcoLine>::Gen<>;
LTAssert::True(Gen::containsPart<parts::Engine>());
LTAssert::True(Gen::containsPart<parts::ElectroEngine>());
LTAssert::False(Gen::containsPart<parts::GasEngine>());
return true;
});
LTest::addTest("DSL3", [](){
using Gen= typename DSL<EcoLine>::Gen<Generator, parts::GasEngine>;
LTAssert::True(Gen::containsPart<parts::Engine>());
LTAssert::True(Gen::containsPart<parts::ElectroEngine>());
LTAssert::True(Gen::containsPart<parts::GasEngine>());
return true;
});
/*
//must not compile: "Unknown DSLClass handling. The is no DSL specialization for given class"
LTest::addTest("DSL4", [](){
using Gen= typename DSL<DEADDSL>::Gen<>;
return true;
});
//*/
/*
//must not compile: "Gas is not Eco"
LTest::addTest("DSL5", [](){
using Gen= typename DSL<StrictEcoLine>::Gen<parts::GasEngine>;
return true;
});
//*/
LTest::addTest("DSL6", [](){
using Gen= typename DSL<StrictEcoLine>::Gen<>;
LTAssert::True(Gen::containsPart<parts::Engine>());
LTAssert::True(Gen::containsPart<parts::ElectroEngine>());
LTAssert::False(Gen::containsPart<parts::GasEngine>());
return true;
});
LTest::addTest("DSL Part Reduce", [](){
using Gen= typename DSL<StrictEcoLine, EcoLine>::Gen<>;
LTAssert::True(Gen::containsPart<parts::Engine>());
LTAssert::True(Gen::containsPart<parts::ElectroEngine>());
LTAssert::False(Gen::containsPart<parts::GasEngine>());
return true;
});
LTest::addTest("Doku Txt ausgabe", [](){
using Doc = typename DSL<StrictEcoLine, EcoLine>::Gen<Documentation>;
Doc docu;
cout<<docu.getTxtDocu()<<endl;
return true;
//.........这里部分代码省略.........