Subversion Repositories tpanel

Rev

Rev 335 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 335 Rev 341
Line 49... Line 49...
49
            std::string result;     // The expected result
49
            std::string result;     // The expected result
50
            bool compare{false};    // TRUE: Compare expected result with real result
50
            bool compare{false};    // TRUE: Compare expected result with real result
51
            bool nowait{false};     // TRUE: Don't wait until the command finished (no compare!)
51
            bool nowait{false};     // TRUE: Don't wait until the command finished (no compare!)
52
            bool reverse{false};    // TRUE: This changes the meaning of success and failure.
52
            bool reverse{false};    // TRUE: This changes the meaning of success and failure.
53
            bool waitscreen{false}; // TRUE: Wait for screen finished even if no comparison is made.
53
            bool waitscreen{false}; // TRUE: Wait for screen finished even if no comparison is made.
-
 
54
            bool saveresult{false}; // TRUE: The result is saved into the named variable
-
 
55
            bool compresult{false}; // TRUE: The result is compared against the named variable
54
        }_TESTCMD;
56
        }_TESTCMD;
55
 
57
 
-
 
58
        typedef struct _VARS
-
 
59
        {
-
 
60
            std::string name;
-
 
61
            std::string content;
-
 
62
        }_VARS;
-
 
63
 
56
        void inject(int port, const std::string& c);
64
        void inject(int port, const std::string& c);
57
        void testSuccess(_TESTCMD& tc);
65
        void testSuccess(_TESTCMD& tc);
58
        void start();
66
        void start();
59
        void inform(const std::string& msg);
67
        void inform(const std::string& msg);
-
 
68
        void saveVariable(const std::string& name, const std::string& content);
-
 
69
        std::string getVariable(const std::string& name);
-
 
70
        void deleteVariable(const Std::string& name);
60
 
71
 
61
        std::thread mThread;
72
        std::thread mThread;
62
        bool isRunning{false};
73
        bool isRunning{false};
63
        std::string mPath;
74
        std::string mPath;
64
        std::vector<std::string> mCmdFiles;
75
        std::vector<std::string> mCmdFiles;
65
        std::string mVerify;         // The real result
76
        std::string mVerify;         // The real result
66
        int mX{0};
77
        int mX{0};
67
        int mY{0};
78
        int mY{0};
68
        bool mPressed{false};
79
        bool mPressed{false};
69
        int mCaseNumber{0};         // The number of the test case
80
        int mCaseNumber{0};         // The number of the test case
-
 
81
        std::string mVarName;
-
 
82
        std::vector<_VARS> mVariables;
70
};
83
};
71
 
84
 
72
extern _TestMode *_gTestMode;
85
extern _TestMode *_gTestMode;
73
 
86
 
74
#define setDone()       __done = true;
87
#define setDone()       __done = true;