Ejemplo n.º 1
0
int 
main(int argc, char* argv[]) 
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
			unit_test(test__supported_filter_type),
			unit_test(test__const_to_str__null),
			unit_test(test__const_to_str__int),
			unit_test(test__const_to_str__text),
			unit_test(test__const_to_str__boolean),
			unit_test(test__const_to_str__NegativeCircle),
			unit_test(test__opexpr_to_pxffilter__null),
			unit_test(test__opexpr_to_pxffilter__unary_expr),
			unit_test(test__opexpr_to_pxffilter__intGT),
			unit_test(test__opexpr_to_pxffilter__allSupportedTypes),
			unit_test(test__opexpr_to_pxffilter__attributeIsNull),
			unit_test(test__opexpr_to_pxffilter__differentTypes),
			unit_test(test__opexpr_to_pxffilter__unsupportedTypeCircle),
			unit_test(test__opexpr_to_pxffilter__twoVars),
			unit_test(test__opexpr_to_pxffilter__unsupportedOpNot),
			unit_test(test__pxf_serialize_filter_list__oneFilter),
			unit_test(test__pxf_serialize_filter_list__manyFilters)
	};
	return run_tests(tests);
}
Ejemplo n.º 2
0
int
main(int argc, char* argv[])
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
		unit_test_setup_teardown(test__MemoryAccounting_Allocate__ChargesOnlyActiveAccount, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__MemoryAccounting_Allocate__AdjustsOutstanding, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__MemoryAccounting_Allocate__AdjustsPeak, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__MemoryAccounting_Free__FreesOldGenFromRollover, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__MemoryAccounting_Free__AdjustsOutstanding, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__MemoryAccounting_Free__KeepsPeakUnchanged, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocAllocInfo__SharesHeader, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocAllocInfo__ChargesSharedChunkHeadersMemoryAccount, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocAllocInfo__UsesNullAccountHeader, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocAllocInfo__LooksAheadInSharedHeaderList, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocAllocInfo__IgnoresOldGenSharedHeaders, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocAllocInfo__InsertsIntoSharedHeaderList, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocFreeInfo__SharedChunkHeadersMemoryAccountIgnoresNullHeader, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocFreeInfo__ReusesNullHeader, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocFreeInfo__FreesObsoleteHeader, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocFreeInfo__FreesOnlyOwnerAccount, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__MemoryAccounting_Allocate__ChargesOnlyActiveAccount, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocSetAllocImpl__LargeAllocInNewBlock, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocSetAllocImpl__LargeAllocInOutstandingBalance, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocSetAllocImpl__LargeAllocInActiveMemoryAccount, SetupMemoryDataStructures, TeardownMemoryDataStructures),
		unit_test_setup_teardown(test__AllocSetRealloc__AdjustsOutstandingBalance, SetupMemoryDataStructures, TeardownMemoryDataStructures),
	};

	return run_tests(tests);
}
Ejemplo n.º 3
0
int
main(int argc, char* argv[])
{
	cmockery_parse_arguments(argc, argv);
	/*
	 * Initializing the gp_sessionstate_loglevel to make sure it is not
	 * set to some random value
	 */
	gp_sessionstate_loglevel = LOG;

	const UnitTest tests[] = {
		unit_test(test__SessionState_ShmemSize__StructLayout),
		unit_test(test__SessionState_ShmemSize__CalculatesCorrectSize),
		unit_test(test__SessionState_ShmemInit__NoOpUnderPostmaster),
		unit_test(test__SessionState_ShmemInit__InitializesWhenPostmaster),
		unit_test(test__SessionState_ShmemInit__LinkedListSanity),
		unit_test(test__SessionState_Init__TestSideffects),
		unit_test(test__SessionState_Init__AcquiresWithReuse),
		unit_test(test__SessionState_Init__AcquiresAndInitializes),
		unit_test(test__SessionState_Init__FailsIfNoFreeSessionStateEntry),
		unit_test(test__SessionState_Shutdown__ReleaseSessionEntry),
		unit_test(test__SessionState_Shutdown__MarksSessionCleanUponRelease),
	};

	return run_tests(tests);
}
Ejemplo n.º 4
0
int main(int argc, char* argv[])
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] =
	{
	unit_test(test__resetSessionForPrimaryGangLoss),
	unit_test(test__createWriterGang),
	unit_test(test__createReaderGang), };

	MemoryContextInit();
	CurrentResourceOwner = ResourceOwnerCreate(NULL, "gang test");
	Gp_role = GP_ROLE_DISPATCH;
	GpIdentity.numsegments = TOTOAL_SEGMENTS;
	GpIdentity.dbid = 1;
	GpIdentity.segindex = -1;
	gp_connections_per_thread = 64;

	Port procport;
	MyProcPort = &procport;
	MyProcPort->database_name = "test";
	MyProcPort->user_name = "gpadmin";

	s_cdb = makeTestCdb(1, TOTOAL_SEGMENTS);

	return run_tests(tests);
}
Ejemplo n.º 5
0
int main(int argc, char* argv[]) {
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
			unit_test(test__BufferedReadUseBeforeBuffer__IsNextReadLenZero),
			unit_test(test__BufferedReadInit__IsConsistent)
	};
	return run_tests(tests);
}
Ejemplo n.º 6
0
int
main(int argc, char* argv[]) {
	cmockery_parse_arguments(argc, argv);
	MemoryContextInit();
	const UnitTest tests[] = {
		unit_test(test__ForwardFsyncRequest_enqueue)
	};
	return run_tests(tests);
}
Ejemplo n.º 7
0
int
main(int argc, char* argv[])
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
		unit_test(test_DistributedLog_Startup_MPP_20426)
	};
	return run_tests(tests);
}
Ejemplo n.º 8
0
int
main(int argc, char* argv[])
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
		unit_test(test__date_in_overrun),
	};
	return run_tests(tests);
}
Ejemplo n.º 9
0
int 
main(int argc, char* argv[]) 
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
			unit_test(test__DeltaCompression__Core)
	};
	return run_tests(tests);
}
Ejemplo n.º 10
0
int 
main(int argc, char* argv[]) 
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
			unit_test(test__custom_fmtopts_string)
	};
	return run_tests(tests);
}
Ejemplo n.º 11
0
int		
main(int argc, char* argv[])
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
		unit_test(test__cdbdisp_dispatchPlan__Overflow_plan_size_in_kb)
	};

	return run_tests(tests);
}
Ejemplo n.º 12
0
int 
main(int argc, char* argv[]) 
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
			unit_test(test__set_config_option),
			unit_test(test__find_option)
	};
	return run_tests(tests);
}
Ejemplo n.º 13
0
int
main(int argc, char* argv[])
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
		unit_test(test_CheckKeepWalSegments)
		, unit_test(test_GetXLogCleanUpToForMaster)
	};
	return run_tests(tests);
}
Ejemplo n.º 14
0
int
main(int argc, char* argv[])
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
		unit_test(test__gp_strxfrm__LongQuery)
	};

	return run_tests(tests);
}
Ejemplo n.º 15
0
int 
main(int argc, char* argv[]) 
{
        cmockery_parse_arguments(argc, argv);

        const UnitTest tests[] = {
        		unit_test(test__MemoryContextInit__CallsMemoryAccountingReset)

        };
        return run_tests(tests);
}
int
main(int argc, char* argv[]) {
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
			unit_test(test__mdver_add_nuke_event_nil),
			unit_test(test__mdver_add_nuke_event_no_nuke),
			unit_test(test__mdver_add_nuke_event_after_nuke)
	};
	return run_tests(tests);
}
int
main(int argc, char* argv[])
{
        cmockery_parse_arguments(argc, argv);

        const UnitTest tests[] = {
                        unit_test(test__ExecEagerFreeShareInputScan_SHARE_NOTSHARED),
                        unit_test(test__ExecEagerFreeShareInputScan_SHARE_MATERIAL)
        };
        return run_tests(tests);
}
Ejemplo n.º 18
0
int
main(int argc, char* argv[])
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
			unit_test(test__set_ps_display),
			unit_test(test__set_ps_display__real_act_prefix_size)
	};
	return run_tests(tests);
}
Ejemplo n.º 19
0
int
main(int argc, char* argv[])
{
    cmockery_parse_arguments(argc, argv);

    const UnitTest tests[] = {
        unit_test(test__ReleaseTupleDesc__no_ref_count),
        unit_test(test__ReleaseTupleDesc__ref_count)
    };

    return run_tests(tests);
}
Ejemplo n.º 20
0
int
main(int argc, char* argv[])
{
        cmockery_parse_arguments(argc, argv);

        const UnitTest tests[] = {
        		unit_test_setup_teardown(test__incompatible_module_error__struct_size_mismatch, SetupDataStructures, TeardownDataStructures),
        		unit_test_setup_teardown(test__incompatible_module_error__headerversion_mismatch, SetupDataStructures, TeardownDataStructures),
        		unit_test_setup_teardown(test__incompatible_module_error__headerversion_identical, SetupDataStructures, TeardownDataStructures),
        };
        return run_tests(tests);
}
Ejemplo n.º 21
0
/* ==================== main ==================== */
int
main(int argc, char* argv[])
{
    cmockery_parse_arguments(argc, argv);

    const UnitTest tests[] = {
      unit_test(test__getSpillFile__Initialize_wfile_success),
      unit_test(test__getSpillFile__Initialize_wfile_exception)
                             };

    return run_tests(tests);
}
Ejemplo n.º 22
0
int 
main(int argc, char* argv[]) 
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
			unit_test(test__AOSegmentFilePathNameLen),
			unit_test(test__FormatAOSegmentFileName),
			unit_test(test__MakeAOSegmentFileName)
	};
	return run_tests(tests);
}
Ejemplo n.º 23
0
int 
main(int argc, char* argv[]) 
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
			unit_test(test__column_to_scan)
	};

	MemoryContextInit();

	return run_tests(tests);
}
Ejemplo n.º 24
0
int
main(int argc, char* argv[])
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
		unit_test(test__bfz_scan_begin_initbytes)
	};

	MemoryContextInit();

	return run_tests(tests);
}
Ejemplo n.º 25
0
int
main(int argc, char* argv[])
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
		unit_test(test__FileRep_StartChildProcess)
	};

	MemoryContextInit();

	return run_tests(tests);
}
Ejemplo n.º 26
0
int 
main(int argc, char* argv[]) 
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
		unit_test(test__ExecSetParamPlan__Check_Dispatch_Results)
	};

	MemoryContextInit();

	return run_tests(tests);
}
Ejemplo n.º 27
0
int 
main(int argc, char* argv[]) 
{
        cmockery_parse_arguments(argc, argv);
        
        const UnitTest tests[] = {
			unit_test(test__find_memory_limited_substring__small_string),
			unit_test(test__find_memory_limited_substring__null_string),
			unit_test(test__find_memory_limited_substring__ascii_chars_within_memory_limit),
			unit_test(test__find_memory_limited_substring__mb_chars_within_memory_limit)
        };
        return run_tests(tests);
}
Ejemplo n.º 28
0
int 
main(int argc, char* argv[]) 
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
			unit_test(test__isFilteringAllowed1),
			unit_test(test__isFilteringAllowed2),
			unit_test(test__isFilteringAllowed3), 
			unit_test(test__isFilteringAllowed4), 
			unit_test(test__isFilteringAllowed5),
			unit_test(test__isFilteringAllowed6),
			unit_test(test__isFilteringAllowed7), 
			unit_test(test__isFilteringAllowed8), 
			unit_test(test__validateTimeStamp7),
			unit_test(test__validateTimeStamp8),
			unit_test(test__validateTimeStamp9),
			unit_test(test__validateTimeStamp10),
			unit_test(test__validateTimeStamp11),
			unit_test(test__validateTimeStamp12),
			unit_test(test__validateTimeStamp13),
			unit_test(test__validateTimeStamp14),
			unit_test(test__validateTimeStamp15),
			unit_test(test__validateTimeStamp16),
			unit_test(test__getTimeStampKey17),
			unit_test(test__getTimeStampKey18),
			unit_test(test__shouldExpandChildren1),
			unit_test(test__shouldExpandChildren2),
			unit_test(test__shouldExpandChildren3),
			unit_test(test__shouldExpandChildren4),
            unit_test(test__shouldDumpSchemaOnly1),
            unit_test(test__shouldDumpSchemaOnly2),
            unit_test(test__shouldDumpSchemaOnly3),
            //hash table tests
            unit_test(test__initialize_hash_table),       
            unit_test(test__insert_into_hash_table),       
            unit_test(test__insert_into_hash_table_duplicate),       
            unit_test(test__insert_into_hash_table_large_num_keys),       
            unit_test(test__hash_func),       
            unit_test(test__hash_func_range),       
            unit_test(test__get_typstorage),       
            unit_test(test__get_typstorage_invalid_key),       
            unit_test(test__remove_node),       
            unit_test(test__remove_node_not_present),       
            unit_test(test__remove_node_not_present_in_list),       
            unit_test(test__clean_up_table),
            unit_test(test__base64),
	};
	return run_tests(tests);
}
Ejemplo n.º 29
0
/* ==================== main ==================== */
int
main(int argc, char* argv[])
{
	cmockery_parse_arguments(argc, argv);

	const UnitTest tests[] = {
		unit_test(test__ExecWorkFile_Create__InTopMemContext),
		unit_test(test__ExecWorkFile_Open__InTopMemContext)
	};

	MemoryContextInit();

	return run_tests(tests);
}
Ejemplo n.º 30
0
int
main(int argc, char *argv[])
{
	cmockery_parse_arguments(argc, argv);

	const		UnitTest tests[] = {
		unit_test(test__aocs_begin_headerscan),
		unit_test(test__aocs_addcol_init)
	};

	MemoryContextInit();

	return run_tests(tests);
}