本文整理汇总了C++中runTests函数的典型用法代码示例。如果您正苦于以下问题:C++ runTests函数的具体用法?C++ runTests怎么用?C++ runTests使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了runTests函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
int main (int argc, char * const argv[])
{
printf("Material Tests\n");
fflush(stdout);
Config config;
if(!loadConfigFromKeyValueFile("render.config", config)) {
return EXIT_FAILURE;
}
auto logger = std::make_shared<FileLogger>("render.log");
logger->mirrorToStdout = config.get<bool>("MIRROR_LOGGING_TO_STDOUT");
setLogger(logger);
config.log(*logger);
mkdir(output_path.c_str(), 0777);
WallClockTimer total_run_timer;
total_run_timer.start();
if( argc > 1 ) {
if( std::string(argv[1]) == "list" ) {
printTests();
exit(EXIT_SUCCESS);
}
else {
// Run a specific test
if( argc > 2 && std::string(argv[2]) == "animate" ) {
animateMaterialTests = true;
}
if( argc > 2 && std::string(argv[2]) == "stereo" ) {
stereoMaterialTests = true;
}
if( argc > 2 && std::string(argv[2]) == "preview" ) {
showPreviewWindow = true;
}
int first, last;
if(sscanf(argv[1], "%d-%d", &first, &last) == 2) {
for(int index = first; index <= last; index++) {
runTest(index);
}
}
else {
runTest(atoi(argv[1]));
}
}
}
else {
// Run all tests
printTests();
logTests(*logger);
runTests();
}
total_run_timer.stop();
printf("Done - Run time = %f seconds\n", total_run_timer.elapsed());
fflush(stdout);
return 0;
}
开发者ID:dacunni,项目名称:FastRender,代码行数:59,代码来源:test_materials.cpp
示例2: runTests
void TextTestResult::printHeader(std::ostream& stream)
{
stream << "\n\n";
if (wasSuccessful())
stream << "OK ("
<< runTests() << " tests)"
<< std::endl;
else
stream << "!!!FAILURES!!!" << std::endl
<< "Runs: "
<< runTests ()
<< " Failures: "
<< testFailures ()
<< " Errors: "
<< testErrors ()
<< std::endl;
}
开发者ID:as2120,项目名称:ZPoco,代码行数:17,代码来源:TextTestResult.cpp
示例3: main
int
main (void)
{
const testFunc tests[] = { test_parsing,
test_updating };
return runTests (tests, NUM_TESTS (tests));
}
开发者ID:AllardJ,项目名称:Tomato,代码行数:8,代码来源:blocklist-test.c
示例4: main
int
main (void)
{
const testFunc tests[] = { test_magnet_link,
test_metainfo };
return runTests (tests, NUM_TESTS (tests));
}
开发者ID:JanX2,项目名称:transmission,代码行数:8,代码来源:metainfo-test.c
示例5: main
int main(int argc, char *argv[])
{
struct Set *set = constructSet();
runTests(set);
SetClose(set);
return 0;
}
开发者ID:vancouverwill,项目名称:learning_c_the_hard_way,代码行数:8,代码来源:set.c
示例6: main
int
main (void)
{
const testFunc tests[] = { test_error_set,
test_error_propagate };
return runTests (tests, NUM_TESTS (tests));
}
开发者ID:JanX2,项目名称:transmission,代码行数:8,代码来源:error-test.c
示例7: initializeVariables
void cStream::runBenchmark()
{
initializeVariables();
runChecks();
runTests();
checkSTREAMresults();
calculateBandwidthResults();
outputSummary();
}; // void cStream::runBenchmark()
开发者ID:van-smith,项目名称:miniBench,代码行数:9,代码来源:cStream.cpp
示例8: main
int main(void)
{
char const* comma_locales[] =
{
"da_DK.UTF-8",
"fr_FR.UTF-8",
"ru_RU.UTF-8"
};
testFunc const tests[] =
{
test_elements,
test_utf8,
test1,
test2,
test3,
test_unescape
};
/* run the tests in a locale with a decimal point of '.' */
setlocale(LC_NUMERIC, "C");
int ret = runTests(tests, NUM_TESTS(tests));
/* run the tests in a locale with a decimal point of ',' */
bool is_locale_set = false;
for (size_t i = 0; !is_locale_set && i < TR_N_ELEMENTS(comma_locales); ++i)
{
is_locale_set = setlocale(LC_NUMERIC, comma_locales[i]) != NULL;
}
if (!is_locale_set)
{
fprintf(stderr, "WARNING: unable to run locale-specific json tests. add a locale like %s or %s\n", comma_locales[0],
comma_locales[1]);
}
else
{
ret += runTests(tests, NUM_TESTS(tests));
}
return ret;
}
开发者ID:camellan,项目名称:torrential,代码行数:44,代码来源:json-test.c
示例9: BOOST_FIXTURE_TEST_CASE
BOOST_FIXTURE_TEST_CASE(CanonizeDev, CanonizeFixture)
{
addTest("dev://eth0", true, "dev://eth0");
addTest("dev://", false, "");
addTest("dev://eth0:8888", false, "");
addTest("dev://eth0/", true, "dev://eth0");
addTest("dev://eth0/A", false, "");
runTests();
}
开发者ID:named-data,项目名称:ndn-cxx,代码行数:10,代码来源:face-uri.t.cpp
示例10: main
int
main( void )
{
static const testFunc tests[] = {
testInt, testStr, testParse, testJSON, testMerge, testBool,
testParse2, testStackSmash,
};
return runTests(tests, NUM_TESTS(tests));
}
开发者ID:biiiep,项目名称:transmission,代码行数:10,代码来源:bencode-test.c
示例11: runTests
void TextTestResult::printHeader (std::ostream &stream)
{
if (wasSuccessful ())
std::cout << "OK (" << runTests () << " tests and "
<< testSuccesses() << " assertions in " << elapsedTime() << " ms)" << std::endl;
else
std::cout << std::endl
<< "!!!FAILURES!!!" << std::endl
<< "Test Results:" << std::endl
<< "Run: "
<< runTests ()
<< " Failures: "
<< testFailures ()
<< " Errors: "
<< testErrors ()
<< std::endl
<< "(" << testSuccesses() << " assertions ran successfully in " << elapsedTime() << " ms)" << std::endl;
}
开发者ID:chenbk85,项目名称:CuteTestForCoastTest,代码行数:19,代码来源:TextTestResult.cpp
示例12: main
int
main (void)
{
const testFunc tests[] = { test_torrent_hash,
test_encrypt_decrypt,
test_sha1,
test_ssha1 };
return runTests (tests, NUM_TESTS (tests));
}
开发者ID:AllardJ,项目名称:Tomato,代码行数:10,代码来源:crypto-test.c
示例13: main
int main(int argc, char *argv[])
{
// Can' destroy the default stream:// TODO - move to another test
HIPCHECK_API(hipStreamDestroy(0), hipErrorInvalidResourceHandle);
HipTest::parseStandardArguments(argc, argv, true /*failOnUndefinedArg*/);
runTests(40000000);
passed();
}
开发者ID:kknox,项目名称:HIP,代码行数:11,代码来源:hipStreamSync2.cpp
示例14: ofSetVerticalSync
//--------------------------------------------------------------
void ofApp::setup() {
ofSetVerticalSync(true);
ofSetFrameRate(30);
ofSetLogLevel("ofxLua", OF_LOG_VERBOSE);
lua.init(true);
lua.addListener(this);
runTests();
loadScript();
}
开发者ID:danomatika,项目名称:ofxLua,代码行数:12,代码来源:ofApp.cpp
示例15: QMainWindow
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
_instance = this;
ui->setupUi(this);
API::getInstance()->init(API::PlatformPtr(new PlatformImpl));
runTests();
}
开发者ID:seagullua,项目名称:free-wifi,代码行数:11,代码来源:MainWindow.cpp
示例16: runSuitesFromIds
/** Runs the suites from the specified ids.
* @param argc
* Id argument count.
* @param argv
* Id arguments with `argv[argc] == NULL`.
*/
void runSuitesFromIds(int argc, char *argv[])
{
AceTestId_t tests[argc + 1];
int i;
for (i = 0; i < argc; i++)
tests[i] = atoAceTestId(argv[i]);
tests[i] = 0;
runTests(tests);
}
开发者ID:nelkinda,项目名称:aceunit,代码行数:18,代码来源:AceUnitMainHosted.c
示例17: main
int main() {
PFC pfc(AES_SECURITY); // initialise pairing-friendly curve
miracl *mip=get_mip(); // get handle on mip (Miracl Instance Pointer)
mip->IOBASE=10;
std::string test_name;
int result = runTests(test_name);
print_test_result(result,test_name);
return 0;
}
开发者ID:alxmirandap,项目名称:testbed,代码行数:12,代码来源:testBL.cpp
示例18: main
int main()
{
InitializeDatabase();
fopen_s(&f, "testResults.html", "wt");
addPrefixToReport();
initializeTests();
runTests();
fclose(f);
CloseDatabase();
if (!ok) return -1;
return 0;
}
开发者ID:boyandgirls,项目名称:Bank,代码行数:12,代码来源:mainTests.c
示例19: runTests
MojErr MojTestRunner::run()
{
// turn off debug error logging
MojLogEngine::instance()->reset(MojLogger::LevelCritical);
runTests();
MojPrintF(_T("\n-----------------------------------\n")
_T("Results: %d succeeded, %d failed\n"),
m_numSucceeded, m_numFailed);
return (MojErr) m_numFailed;
}
开发者ID:BigBlueHat,项目名称:db8,代码行数:12,代码来源:MojTestRunner.cpp
示例20: main
int main()
{
printf("main() started\n");
runTests(0);
/*
osThreadDef_t testRunnerThread = {runTests, osPriorityNormal, 1, 0};
if (osThreadCreate(&testRunnerThread, 0) == NULL)
printf("Failed to start the test runner\n");
*/
while (1);
}
开发者ID:ombre5733,项目名称:weos,代码行数:13,代码来源:test_main.cpp
注:本文中的runTests函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论