예제 #1
0
파일: TestJson.c 프로젝트: pavansondur/lucy
void
TestJson_run_tests() {
    int num_tests = 107;
#ifndef LUCY_VALGRIND
    num_tests += 28; // FIXME: syntax errors leak memory.
#endif
    TestBatch *batch = TestBatch_new(num_tests);
    TestBatch_Plan(batch);

    // Test tolerance, then liberalize for testing.
    test_tolerance(batch);
    Json_set_tolerant(true);

    test_to_and_from(batch);
    test_escapes(batch);
    test_numbers(batch);
    test_spew_and_slurp(batch);
    test_integers(batch);
    test_floats(batch);
    test_max_depth(batch);
    test_illegal_keys(batch);

#ifndef LUCY_VALGRIND
    test_syntax_errors(batch);
#endif

    DECREF(batch);
}
예제 #2
0
int main(void)
{
    int i;

    test_strings();

    test_integers();

    for (i = 10; i < 100; ++i)
	test_integers_multi(i);

    return 0;
}
예제 #3
0
파일: test_lite.c 프로젝트: svn2github/hdf5
/*-------------------------------------------------------------------------
* test H5LTtext_to_dtype function
*-------------------------------------------------------------------------
*/
static int test_text_dtype(void)
{
    TESTING("H5LTtext_to_dtype");

    if(test_integers()<0)
        goto out;

    if(test_fps()<0)
        goto out;

    if(test_strings()<0)
        goto out;

    if(test_opaques()<0)
        goto out;

    if(test_enums()<0)
        goto out;

    if(test_variables()<0)
        goto out;

    if(test_arrays()<0)
        goto out;

    if(test_compounds()<0)
        goto out;

    if(test_compound_bug()<0)
        goto out;

    if(test_complicated_compound()<0)
        goto out;

    return 0;

out:
    return -1;
}
예제 #4
0
파일: TestJson.c 프로젝트: rectang/lucy
void
TestJson_Run_IMP(TestJson *self, TestBatchRunner *runner) {
    uint32_t num_tests = 105;
#ifndef LUCY_VALGRIND
    num_tests += 28; // FIXME: syntax errors leak memory.
#endif
    TestBatchRunner_Plan(runner, (TestBatch*)self, num_tests);

    // Test tolerance, then liberalize for testing.
    test_tolerance(runner);
    Json_set_tolerant(true);

    test_to_and_from(runner);
    test_escapes(runner);
    test_numbers(runner);
    test_spew_and_slurp(runner);
    test_integers(runner);
    test_floats(runner);
    test_max_depth(runner);

#ifndef LUCY_VALGRIND
    test_syntax_errors(runner);
#endif
}
예제 #5
0
파일: test.c 프로젝트: jpcummins/sortr
int main() {
    test_integers(bubble_sort, "bubble_sort.c");
    test_integers(insert_sort, "insert_sort.c");
    test_integers(insert_sort, "heap_sort.c");
    return 0;
}