当前位置: 首页>>代码示例>>C++>>正文


C++ runTests函数代码示例

本文整理汇总了C++中runTests函数的典型用法代码示例。如果您正苦于以下问题:C++ runTests函数的具体用法?C++ runTests怎么用?C++ runTests使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了runTests函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的runTests函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。