当前位置: 首页>>代码示例>>C++>>正文


C++ Doc::getTxtDocu方法代码示例

本文整理汇总了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;
//.........这里部分代码省略.........
开发者ID:IngoRoessner,项目名称:carGenTest,代码行数:101,代码来源:main.cpp


注:本文中的Doc::getTxtDocu方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。