mfile_test.h

来自「跨平台C++基础库」· C头文件 代码 · 共 120 行

H
120
字号

#ifndef MFILE_TEST_H
#define MFILE_TEST_H

#include <cppunit/extensions/HelperMacros.h>

class MFileTest: public CppUnit::TestFixture
{
    CPPUNIT_TEST_SUITE( MFileTest );

    CPPUNIT_TEST( testOpenNormal );
    CPPUNIT_TEST( testOpenNotExist );
    CPPUNIT_TEST( testCloseNormal );
    CPPUNIT_TEST( testCloseNotOpen );

    CPPUNIT_TEST( testLengthNormal );
    CPPUNIT_TEST( testLengthNotOpen );

    CPPUNIT_TEST( testSeekNormal );
    CPPUNIT_TEST( testSeekExceed );
    CPPUNIT_TEST( testSeekNotOpen );
    CPPUNIT_TEST( testTellNormal );
    CPPUNIT_TEST( testTellNotOpen );

    CPPUNIT_TEST( testReadNormal );
    CPPUNIT_TEST( testReadEnd );
    CPPUNIT_TEST( testReadNotOpen );
    CPPUNIT_TEST( testWriteNormal );
    CPPUNIT_TEST( testWriteNotOpen );

    CPPUNIT_TEST( testResizeNormal );
    CPPUNIT_TEST( testResizeNotOpen );
    CPPUNIT_TEST( testResizeLess );

    CPPUNIT_TEST( testIs_openNormal );
    CPPUNIT_TEST( testIs_openNotOpen );

    CPPUNIT_TEST( testClearNormal );
    CPPUNIT_TEST( testClearNotExist );

    CPPUNIT_TEST( testCreate );

    CPPUNIT_TEST( testCompareNormal );
    CPPUNIT_TEST( testCompareDiff );
    CPPUNIT_TEST( testCompareNotExist );

    CPPUNIT_TEST( testCopyNormal );
    CPPUNIT_TEST( testCopySrcNotExist );
    CPPUNIT_TEST( testCopyDestCannotCreate );

    CPPUNIT_TEST( testStaticReadNormal );
    CPPUNIT_TEST( testStaticReadExceed );
    CPPUNIT_TEST( testStaticReadNotExist );

    CPPUNIT_TEST( testStaticWriteNormal );
    CPPUNIT_TEST( testStaticWriteExceed );
    CPPUNIT_TEST( testStaticWriteNotExist );

    CPPUNIT_TEST( testStaticAppendNormal );

    CPPUNIT_TEST_SUITE_END();

public:
    void    setUp();
    void    tearDown();

    void    testOpenNormal();
    void    testOpenNotExist();
    void    testCloseNormal();
    void    testCloseNotOpen();

    void    testLengthNormal();
    void    testLengthNotOpen();

    void    testSeekNormal();
    void    testSeekExceed();
    void    testSeekNotOpen();
    void    testTellNormal();
    void    testTellNotOpen();

    void    testReadNormal();
    void    testReadEnd();
    void    testReadNotOpen();
    void    testWriteNormal();
    void    testWriteNotOpen();

    void    testResizeNormal();
    void    testResizeNotOpen();
    void    testResizeLess();

    void    testIs_openNormal();
    void    testIs_openNotOpen();

    void    testClearNormal();
    void    testClearNotExist();

    void    testCreate();

    void    testCompareNormal();
    void    testCompareDiff();
    void    testCompareNotExist();

    void    testCopyNormal();
    void    testCopySrcNotExist();
    void    testCopyDestCannotCreate();

    void    testStaticReadNormal();
    void    testStaticReadExceed();
    void    testStaticReadNotExist();

    void    testStaticWriteNormal();
    void    testStaticWriteExceed();
    void    testStaticWriteNotExist();

    void    testStaticAppendNormal();
};

#endif //MFILE_TEST_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?