suite.h

来自「Password Safe Password Safe is a passwor」· C头文件 代码 · 共 68 行

H
68
字号
// suite.h#ifndef SUITE_H#define SUITE_H#include "test.h"   // includes <string>, <iosfwd>#include <vector>using std::string;using std::ostream;using std::vector;class TestSuiteError;class Suite{public:    Suite(const string& name, ostream* osptr = 0);    string getName() const;    long getNumPassed() const;    long getNumFailed() const;    const ostream* getStream() const;    void setStream(ostream* osptr);        void addTest(Test* t) throw (TestSuiteError);    void addSuite(const Suite&) throw(TestSuiteError);    void run();     // Calls Test::run() repeatedly    long report() const;    void free();    // deletes testsprivate:    string m_name;    ostream* m_osptr;    vector<Test*> m_tests;    void reset();    // Disallowed ops:    Suite(const Suite&);    Suite& operator=(const Suite&);};inlineSuite::Suite(const string& name, ostream* osptr)     : m_name(name){    m_osptr = osptr;}inlinestring Suite::getName() const{    return m_name;}inlineconst ostream* Suite::getStream() const{    return m_osptr;}inlinevoid Suite::setStream(ostream* osptr){    m_osptr = osptr;}#endif

⌨️ 快捷键说明

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