コード例 #1
4
 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
 }
コード例 #2
3
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;
}
コード例 #3
0
ファイル: testvaarg.cpp プロジェクト: thomasjfox/cppcheck
 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);
 }
コード例 #4
0
ファイル: test64bit.cpp プロジェクト: gansb/cppcheck
 void run() {
     TEST_CASE(novardecl);
     TEST_CASE(functionpar);
     TEST_CASE(structmember);
     TEST_CASE(ptrcompare);
     TEST_CASE(ptrarithmetic);
 }
コード例 #5
0
ファイル: testcharvar.cpp プロジェクト: DeepuDon/cppcheck
    void run() {
        settings.platform(Settings::Unspecified);
        settings.addEnabled("warning");

        TEST_CASE(array_index_1);
        TEST_CASE(array_index_2);
        TEST_CASE(bitop);
    }
コード例 #6
0
    void run() {
        settings.addEnabled("warning");

        TEST_CASE(assignmentInAssert);
        TEST_CASE(functionCallInAssert);
        TEST_CASE(memberFunctionCallInAssert);
        TEST_CASE(safeFunctionCallInAssert);
    }
コード例 #7
0
namespace test
{
    test_group discrete_genotype_matrix {
        TEST_CASE(compute_derivatives_f),
        TEST_CASE(compute_derivatives_q),
        TEST_CASE(constructor)
    };
}
コード例 #8
0
ファイル: testcppcheck.cpp プロジェクト: gscacco/cppcheck
    void run()
    {
        TEST_CASE(linenumbers);
        // TEST_CASE(linenumbers2);

        TEST_CASE(xml);

        TEST_CASE(include);
    }
コード例 #9
0
ファイル: parse_test.c プロジェクト: b-cuts/qpid-dispatch
int parse_tests()
{
    int result = 0;

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

    return result;
}
コード例 #10
0
ファイル: message_test.c プロジェクト: ted-ross/nexus
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;
}
コード例 #11
0
ファイル: policy_test.c プロジェクト: apache/qpid-dispatch
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;
}
コード例 #12
0
ファイル: testdivision.cpp プロジェクト: caidongyun/seccheck
 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)
 }
コード例 #13
0
ファイル: parse_test.c プロジェクト: apache/qpid-dispatch
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;
}
コード例 #14
0
    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);
    }
コード例 #15
0
ファイル: testdivision.cpp プロジェクト: CyberTech/cppcheck
 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);
 }
コード例 #16
0
ファイル: testtoken.cpp プロジェクト: themiwi/cppcheck
    void run()
    {
        TEST_CASE(nextprevious);
        TEST_CASE(multiCompare);
        TEST_CASE(getStrLength);
        TEST_CASE(strValue);

        TEST_CASE(deleteLast);

        TEST_CASE(matchAny);
        TEST_CASE(matchNothingOrAnyNotElse);
        TEST_CASE(matchNumeric);
        TEST_CASE(matchBoolean);
        TEST_CASE(matchOr);
    }
コード例 #17
0
ファイル: testsuppressions.cpp プロジェクト: 0x20e/cppcheck
    void run() {
        TEST_CASE(suppressionsBadId1);
        TEST_CASE(suppressionsDosFormat);     // Ticket #1836
        TEST_CASE(suppressionsFileNameWithColon);    // Ticket #1919 - filename includes colon
        TEST_CASE(suppressionsGlob);
        TEST_CASE(suppressionsFileNameWithExtraPath);
        TEST_CASE(suppressionsSettings);
        TEST_CASE(suppressionsMultiFile);
        TEST_CASE(suppressionsPathSeparator);

        TEST_CASE(inlinesuppress_unusedFunction); // #4210 - unusedFunction
    }
コード例 #18
0
 void run()
 {
     TEST_CASE(test1);
     TEST_CASE(test2);
     TEST_CASE(test3);
     TEST_CASE(test4);
     TEST_CASE(test5);
     TEST_CASE(test_numeric);
     TEST_CASE(intarray);
     TEST_CASE(structarraynull);
     TEST_CASE(structarray);
 }
コード例 #19
0
ファイル: zmq.cpp プロジェクト: citymaps/prime_server
int main() {
  //make this whole thing bail if it doesnt finish fast
  alarm(30);

  testing::suite suite("zmq");

  suite.test(TEST_CASE(test_batch_overflow_synchronous));

  suite.test(TEST_CASE(test_batch_overflow_asynchronous));

  suite.test(TEST_CASE(test_batch_overflow_router_dealer));

  suite.test(TEST_CASE(test_batch_overflow));

  return suite.tear_down();
}
コード例 #20
0
ファイル: test_srq.c プロジェクト: yuvalshaia/ibkvl-ref
/* ib_create_srq ib_destroy_srq */
int srq_1(
	IN	struct config_t *config,
	IN	struct resources *res,
	IN	struct ib_client *test_client)
{
	struct ib_pd 		*pd = ERR_PTR(-EINVAL);
	struct ib_srq		*srq = ERR_PTR(-EINVAL);
	int			result = -1;
	int			rc;

	TEST_CASE("ib_create_srq ib_destroy_srq");

	pd = ib_alloc_pd(res->device);
	CHECK_PTR("ib_alloc_pd", !IS_ERR(pd), goto cleanup);

	res->attributes.srq_init_attr.event_handler = srq_event_handler;
	init_srq_cap(config, res, &res->attributes.srq_init_attr);

	srq = ib_create_srq(pd, &res->attributes.srq_init_attr);
	CHECK_PTR("ib_create_srq", !IS_ERR(srq), goto cleanup);

	rc = ib_destroy_srq(srq);
	CHECK_VALUE("ib_destroy_srq", rc, 0, goto cleanup);

	PASSED;

	result = 0;

cleanup:

	if (!IS_ERR(pd)) {
		rc = ib_dealloc_pd(pd);
		CHECK_VALUE("ib_dealloc_pd", rc, 0, return -1);
	}
コード例 #21
0
ファイル: testsizeof.cpp プロジェクト: Dmitry-Me/cppcheck
    void run() {
        settings.addEnabled("warning");
        settings.addEnabled("portability");
        settings.inconclusive = true;

        TEST_CASE(sizeofsizeof);
        TEST_CASE(sizeofCalculation);
        TEST_CASE(checkPointerSizeof);
        TEST_CASE(checkPointerSizeofStruct);
        TEST_CASE(sizeofDivisionMemset);
        TEST_CASE(sizeofForArrayParameter);
        TEST_CASE(sizeofForNumericParameter);
        TEST_CASE(suspiciousSizeofCalculation);
        TEST_CASE(sizeofVoid);
        TEST_CASE(customStrncat);
    }
コード例 #22
0
ファイル: tool_test.c プロジェクト: ncdc/qpid
int tool_tests(void)
{
    int result = 0;

    TEST_CASE(test_deq_basic, 0);

    return result;
}
コード例 #23
0
ファイル: test_framebuffer.cpp プロジェクト: sondrele/NTNU
void FrameBufferTestSuite() {
    TEST_CASE(framebuffer_inits);
    TEST_CASE(can_project_and_scale_points);
    TEST_CASE(can_project_mesh_point);
    TEST_CASE(can_project_micropolygon);
    TEST_CASE(bounding_box_for_microPolygon_has_right_coords);
    TEST_CASE(pixels_has_sample);
    TEST_CASE(pixels_has_samples);
    TEST_CASE(pixel_has_zbuffer);
}
コード例 #24
0
// Check all functions of unistd.h
void run_strings_tests()
{
    TEST_CASE("Test POSIX strings.h functions");

    test_ffs();

    test_strcasecmp();
    test_strncasecmp();
}
コード例 #25
0
ファイル: simpletest.c プロジェクト: CuiMingFu/zumastor
test_suite get_suite(void)
{
	return MAKE_SIMPLE_SUITE("simple suite",
							 SIMPLE_TEST(test_simple),
							 SIMPLE_TEST(test2),
							 SIMPLE_TEST(test_failure),
							 SIMPLE_TEST(test_three_way),
							 TEST_CASE(test_setup_failure, setup_failure, tear_down));
}
コード例 #26
0
 void run()
 {
     TEST_CASE(testsimple);
     TEST_CASE(testfor);
     TEST_CASE(teststream);
     TEST_CASE(testvolatile);
     TEST_CASE(testiterator);
     TEST_CASE(test2168);
     TEST_CASE(pointer);   // #2321 - postincrement of pointer is OK
     TEST_CASE(testHangWithInvalidCode); // #2847 - cppcheck hangs with 100% cpu load
 }
コード例 #27
0
ファイル: timer_test.c プロジェクト: ChugR/qpid-dispatch
int timer_tests(void)
{
    int result = 0;

    fire_mask = 0;
    DEQ_INIT(pending_timers);
    lock = qd_timer_lock();
    time_value = 1;

    timers[0]  = qd_timer(0, 0, (void*) 0x00000001);
    timers[1]  = qd_timer(0, 0, (void*) 0x00000002);
    timers[2]  = qd_timer(0, 0, (void*) 0x00000004);
    timers[3]  = qd_timer(0, 0, (void*) 0x00000008);
    timers[4]  = qd_timer(0, 0, (void*) 0x00000010);
    timers[5]  = qd_timer(0, 0, (void*) 0x00000020);
    timers[6]  = qd_timer(0, 0, (void*) 0x00000040);
    timers[7]  = qd_timer(0, 0, (void*) 0x00000080);
    timers[8]  = qd_timer(0, 0, (void*) 0x00000100);
    timers[9]  = qd_timer(0, 0, (void*) 0x00000200);
    timers[10] = qd_timer(0, 0, (void*) 0x00000400);
    timers[11] = qd_timer(0, 0, (void*) 0x00000800);
    timers[12] = qd_timer(0, 0, (void*) 0x00001000);
    timers[13] = qd_timer(0, 0, (void*) 0x00002000);
    timers[14] = qd_timer(0, 0, (void*) 0x00004000);
    timers[15] = qd_timer(0, 0, (void*) 0x00008000);

    TEST_CASE(test_quiet, 0);
    TEST_CASE(test_immediate, 0);
    TEST_CASE(test_immediate_reschedule, 0);
    TEST_CASE(test_immediate_plus_delayed, 0);
    TEST_CASE(test_single, 0);
    TEST_CASE(test_two_inorder, 0);
    TEST_CASE(test_two_reverse, 0);
    TEST_CASE(test_two_duplicate, 0);
    TEST_CASE(test_separated, 0);
    TEST_CASE(test_big, 0);

    int i;
    for (i = 0; i < 16; i++)
        qd_timer_free(timers[i]);

    return result;
}
コード例 #28
0
ファイル: testoptions.cpp プロジェクト: Dmitry-Me/cppcheck
 void run() {
     TEST_CASE(which_test);
     TEST_CASE(which_test_method);
     TEST_CASE(no_test_method);
     TEST_CASE(not_quiet);
     TEST_CASE(quiet);
     TEST_CASE(multiple_testcases);
     TEST_CASE(invalid_switches);
 }
コード例 #29
0
 void run() {
     TEST_CASE(suppressionsBadId1);
     TEST_CASE(suppressionsDosFormat);     // Ticket #1836
     TEST_CASE(suppressionsFileNameWithColon);    // Ticket #1919 - filename includes colon
     TEST_CASE(suppressionsGlob);
     TEST_CASE(suppressionsFileNameWithExtraPath);
     TEST_CASE(suppressionsSettings);
     TEST_CASE(suppressionsMultiFile);
 }
コード例 #30
0
ファイル: testsizeof.cpp プロジェクト: devlato/cppcheck
 void run() {
     TEST_CASE(sizeofsizeof);
     TEST_CASE(sizeofCalculation);
     TEST_CASE(checkPointerSizeof);
     TEST_CASE(sizeofForArrayParameter);
     TEST_CASE(sizeofForNumericParameter);
     TEST_CASE(suspiciousSizeofCalculation);
     TEST_CASE(sizeofVoid);
 }