?? testregistry.cpp
字號:
#include "Test.h"
#include "TestResult.h"
#include "TestRegistry.h"
void TestRegistry::addTest (Test *test)
{
instance ().add (test);
}
void TestRegistry::runAllTests (TestResult& result)
{
instance ().run (result);
}
TestRegistry& TestRegistry::instance () {
static TestRegistry registry;
return registry;
}
void TestRegistry::add (Test *test) {
tests.push_back (test);
}
void TestRegistry::run (TestResult& result) {
result.startTests ();
for (std::vector<Test *>::iterator it = tests.begin (); it != tests.end (); ++it)
(*it)->run (result);
result.endTests ();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -