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


C++ TEST_CASE函数代码示例

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


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

示例1: run

 void run() {
     TEST_CASE(wrongParameterTo_va_start);
     TEST_CASE(referenceAs_va_start);
     TEST_CASE(va_end_missing);
     TEST_CASE(va_list_usedBeforeStarted);
     TEST_CASE(va_start_subsequentCalls);
 }
开发者ID:thomasjfox,项目名称:cppcheck,代码行数:7,代码来源:testvaarg.cpp

示例2: run

 void run() {
     TEST_CASE(novardecl);
     TEST_CASE(functionpar);
     TEST_CASE(structmember);
     TEST_CASE(ptrcompare);
     TEST_CASE(ptrarithmetic);
 }
开发者ID:gansb,项目名称:cppcheck,代码行数:7,代码来源:test64bit.cpp

示例3: run

 void run() {
     TEST_CASE(assignAndCompare);   // assignment and comparison don't match
     TEST_CASE(mismatchingBitAnd);  // overlapping bitmasks
     TEST_CASE(compare);            // mismatching LHS/RHS in comparison
     TEST_CASE(multicompare);       // mismatching comparisons
     TEST_CASE(duplicateIf);        // duplicate conditions in if and else-if
 }
开发者ID:jonasgacrama,项目名称:cppcheck,代码行数:7,代码来源:testassignif.cpp

示例4: main

int main(int argc, char * argv[])
{
    test_case                           tests[] =
    {
        TEST_CASE(unpack_test),
        TEST_CASE(unpack_test_with_extensions),
        TEST_CASE(unpack_null_param_test),
        TEST_CASE(unpack_bad_message_test)
    };
    int                                 i;
    int                                 rc;
    int                                 not_ok = 0;

    printf("1..%d\n", ARRAY_LEN(tests));

    globus_module_activate(GLOBUS_GRAM_PROTOCOL_MODULE);
    for (i = 0; i < ARRAY_LEN(tests); i++)
    {
        rc = tests[i].test_function();

        if (rc != 0)
        {
            not_ok++;
            printf("not ok # %s\n", tests[i].name);
        }
        else
        {
            printf("ok\n");
        }
    }
    globus_module_deactivate(GLOBUS_GRAM_PROTOCOL_MODULE);

    return not_ok;
}
开发者ID:bbockelm,项目名称:globus-toolkit,代码行数:34,代码来源:unpack_message_test.c

示例5: run

    void run() {
        settings.platform(Settings::Unspecified);
        settings.addEnabled("warning");

        TEST_CASE(array_index_1);
        TEST_CASE(array_index_2);
        TEST_CASE(bitop);
    }
开发者ID:DeepuDon,项目名称:cppcheck,代码行数:8,代码来源:testcharvar.cpp

示例6: run

    void run() {
        settings.addEnabled("warning");

        TEST_CASE(assignmentInAssert);
        TEST_CASE(functionCallInAssert);
        TEST_CASE(memberFunctionCallInAssert);
        TEST_CASE(safeFunctionCallInAssert);
    }
开发者ID:DivineLawnmower,项目名称:cppcheck,代码行数:8,代码来源:testassert.cpp

示例7: TEST_CASE

namespace test
{
    test_group discrete_genotype_matrix {
        TEST_CASE(compute_derivatives_f),
        TEST_CASE(compute_derivatives_q),
        TEST_CASE(constructor)
    };
}
开发者ID:jade-cheng,项目名称:ohana,代码行数:8,代码来源:test.discrete_genotype_matrix.cpp

示例8: run

    void run()
    {
        TEST_CASE(linenumbers);
        // TEST_CASE(linenumbers2);

        TEST_CASE(xml);

        TEST_CASE(include);
    }
开发者ID:gscacco,项目名称:cppcheck,代码行数:9,代码来源:testcppcheck.cpp

示例9: parse_tests

int parse_tests()
{
    int result = 0;

    TEST_CASE(test_parser_fixed_scalars, 0);
    TEST_CASE(test_parser_errors, 0);

    return result;
}
开发者ID:b-cuts,项目名称:qpid-dispatch,代码行数:9,代码来源:parse_test.c

示例10: message_tests

int message_tests(void)
{
    int result = 0;

    TEST_CASE(test_init, 0);
    TEST_CASE(test_send_to_messenger, 0);
    TEST_CASE(test_receive_from_messenger, 0);
    TEST_CASE(test_insufficient_check_depth, 0);

    return result;
}
开发者ID:ted-ross,项目名称:nexus,代码行数:11,代码来源:message_test.c

示例11: policy_tests

int policy_tests(void)
{
    int result = 0;
    char *test_group = "policy_tests";

    TEST_CASE(test_link_name_lookup, 0);
    TEST_CASE(test_link_name_tree_lookup, 0);
    TEST_CASE(test_link_name_csv_parser, 0);

    return result;
}
开发者ID:apache,项目名称:qpid-dispatch,代码行数:11,代码来源:policy_test.c

示例12: run

 void run() {
     TEST_CASE(division1);
     TEST_CASE(division2);
     TEST_CASE(division4);
     TEST_CASE(division5);
     TEST_CASE(division6);
     TEST_CASE(division7);
     TEST_CASE(division8);
     TEST_CASE(division9);
     TEST_CASE(division10);
     TEST_CASE(division11);  // no error when using "unsigned char" (it is promoted)
 }
开发者ID:caidongyun,项目名称:seccheck,代码行数:12,代码来源:testdivision.cpp

示例13: parse_tests

int parse_tests()
{
    int result = 0;
    char *test_group = "parse_tests";

    TEST_CASE(test_parser_fixed_scalars, 0);
    TEST_CASE(test_map, 0);
    TEST_CASE(test_parser_errors, 0);
    TEST_CASE(test_tracemask, 0);
    TEST_CASE(test_integer_conversion, 0);

    return result;
}
开发者ID:apache,项目名称:qpid-dispatch,代码行数:13,代码来源:parse_test.c

示例14: run

    void run() {
        // bail out if the tests are not executed from the base folder
        {
            std::ifstream fin("test/testfilelister.cpp");
            if (!fin.is_open())
                return;
        }

        TEST_CASE(isDirectory);
#ifndef _WIN32
        TEST_CASE(absolutePath);
#endif
        TEST_CASE(recursiveAddFiles);
    }
开发者ID:PerryHolen,项目名称:cppcheck,代码行数:14,代码来源:testfilelister.cpp

示例15: run

 void run() {
     TEST_CASE(division1);
     TEST_CASE(division2);
     TEST_CASE(division4);
     TEST_CASE(division5);
     TEST_CASE(division6);
     TEST_CASE(division7);
     TEST_CASE(division8);
     TEST_CASE(division9);
     TEST_CASE(division10);
 }
开发者ID:CyberTech,项目名称:cppcheck,代码行数:11,代码来源:testdivision.cpp


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