Beispiel #1
0
//---------------------------------------------------------------------------
//	@function:
//		CMDAccessorTest::EresUnittest
//
//	@doc:
//		
//
//---------------------------------------------------------------------------
GPOS_RESULT
CMDAccessorTest::EresUnittest()
{
	CUnittest rgut[] =
		{
		GPOS_UNITTEST_FUNC(CMDAccessorTest::EresUnittest_Basic),
		GPOS_UNITTEST_FUNC(CMDAccessorTest::EresUnittest_Datum),
#ifdef GPOS_DEBUG
		GPOS_UNITTEST_FUNC_ASSERT(CMDAccessorTest::EresUnittest_DatumGeneric),
#endif
		GPOS_UNITTEST_FUNC(CMDAccessorTest::EresUnittest_Navigate),
		GPOS_UNITTEST_FUNC_THROW
			(
			CMDAccessorTest::EresUnittest_Negative,
			gpdxl::ExmaMD,
			gpdxl::ExmiMDCacheEntryNotFound
			),
		GPOS_UNITTEST_FUNC(CMDAccessorTest::EresUnittest_Indexes),
		GPOS_UNITTEST_FUNC(CMDAccessorTest::EresUnittest_CheckConstraint),
		GPOS_UNITTEST_FUNC(CMDAccessorTest::EresUnittest_IndexPartConstraint),
		GPOS_UNITTEST_FUNC(CMDAccessorTest::EresUnittest_Cast),
		GPOS_UNITTEST_FUNC(CMDAccessorTest::EresUnittest_ScCmp),
		GPOS_UNITTEST_FUNC(CMDAccessorTest::EresUnittest_ConcurrentAccessSingleMDA),
		GPOS_UNITTEST_FUNC(CMDAccessorTest::EresUnittest_ConcurrentAccessMultipleMDA)
		};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
Beispiel #2
0
//---------------------------------------------------------------------------
//	@function:
//		CMiniDumperDXLTest::EresUnittest
//
//	@doc:
//		Unittest for DXL minidumps
//
//---------------------------------------------------------------------------
GPOS_RESULT
CMiniDumperDXLTest::EresUnittest()
{
	CUnittest rgut[] =
		{
		GPOS_UNITTEST_FUNC(CMiniDumperDXLTest::EresUnittest_Basic),
		GPOS_UNITTEST_FUNC(CMiniDumperDXLTest::EresUnittest_Load),
		};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
Beispiel #3
0
//---------------------------------------------------------------------------
//	@function:
//		CJoinOrderTest::EresUnittest
//
//	@doc:
//		Unittest for predicate utilities
//
//---------------------------------------------------------------------------
GPOS_RESULT
CJoinOrderTest::EresUnittest()
{

	CUnittest rgut[] =
		{
		GPOS_UNITTEST_FUNC(CJoinOrderTest::EresUnittest_Expand),
		GPOS_UNITTEST_FUNC(EresUnittest_ExpandMinCard)
		};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
Beispiel #4
0
//---------------------------------------------------------------------------
//	@function:
//		CPredicateUtilsTest::EresUnittest
//
//	@doc:
//		Unittest for predicate utilities
//
//---------------------------------------------------------------------------
GPOS_RESULT
CPredicateUtilsTest::EresUnittest()
{

	CUnittest rgut[] =
		{
		GPOS_UNITTEST_FUNC(CPredicateUtilsTest::EresUnittest_Conjunctions),
		GPOS_UNITTEST_FUNC(CPredicateUtilsTest::EresUnittest_Disjunctions),
		GPOS_UNITTEST_FUNC(CPredicateUtilsTest::EresUnittest_PlainEqualities),
		GPOS_UNITTEST_FUNC(CPredicateUtilsTest::EresUnittest_Implication),
		};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
Beispiel #5
0
//---------------------------------------------------------------------------
//	@function:
//		CXformTest::EresUnittest
//
//	@doc:
//		Unittest driver
//
//---------------------------------------------------------------------------
GPOS_RESULT
CXformTest::EresUnittest()
{
	CUnittest rgut[] =
	{
		GPOS_UNITTEST_FUNC(CXformTest::EresUnittest_ApplyXforms),
		GPOS_UNITTEST_FUNC(CXformTest::EresUnittest_ApplyXforms_CTE),
#ifdef GPOS_DEBUG
		GPOS_UNITTEST_FUNC(CXformTest::EresUnittest_Mapping),
#endif // GPOS_DEBUG
	};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
	GPOS_RESULT
	CJoinCardinalityNDVBasedEqPredTest::EresUnittest()
	{
		CUnittest rgut[] =
				{
						GPOS_UNITTEST_FUNC(EresUnittest_NDVEqCardEstimation),
						GPOS_UNITTEST_FUNC(EresUnittest_NDVCardEstimationNotApplicableMultipleIdents),
						GPOS_UNITTEST_FUNC(EresUnittest_NDVCardEstimationNotApplicableInequalityRange)
				};

		GPOS_RESULT eres = CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));

		return eres;
	}
//---------------------------------------------------------------------------
//	@function:
//		CSubqueryHandlerTest::EresUnittest
//
//	@doc:
//		Unittest for predicate utilities
//
//---------------------------------------------------------------------------
GPOS_RESULT
CSubqueryHandlerTest::EresUnittest()
{

	CUnittest rgut[] =
		{
		GPOS_UNITTEST_FUNC(CSubqueryHandlerTest::EresUnittest_Subquery2Apply),
		GPOS_UNITTEST_FUNC(CSubqueryHandlerTest::EresUnittest_SubqueryWithDisjunction),
		GPOS_UNITTEST_FUNC(CSubqueryHandlerTest::EresUnittest_RunMinidumpTests),
#ifdef GPOS_DEBUG
		GPOS_UNITTEST_FUNC_ASSERT(CSubqueryHandlerTest::EresUnittest_SubqueryWithConstSubqueries),
#endif // GPOS_DEBUG
		};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
Beispiel #8
0
//---------------------------------------------------------------------------
//	@function:
//		CCostTest::EresUnittest
//
//	@doc:
//		Driver for unittests
//
//---------------------------------------------------------------------------
GPOS_RESULT
CCostTest::EresUnittest()
{
	CUnittest rgut[] =
		{
		GPOS_UNITTEST_FUNC(CCostTest::EresUnittest_Bool),
		GPOS_UNITTEST_FUNC(CCostTest::EresUnittest_Arithmetic),
		GPOS_UNITTEST_FUNC(CCostTest::EresUnittest_Params),
		GPOS_UNITTEST_FUNC(CCostTest::EresUnittest_Parsing),
		GPOS_UNITTEST_FUNC(EresUnittest_SetParams),

		// TODO: : re-enable test after resolving exception throwing problem on OSX
		// GPOS_UNITTEST_FUNC_THROW(CCostTest::EresUnittest_ParsingWithException, gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag),
		};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
Beispiel #9
0
//---------------------------------------------------------------------------
//	@function:
//		CParseHandlerTest::EresUnittest
//
//	@doc:
//		Unittest for DXL parsing
//
//---------------------------------------------------------------------------
GPOS_RESULT
CParseHandlerTest::EresUnittest()
{
	CUnittest rgut[] =
		{
		GPOS_UNITTEST_FUNC(CParseHandlerTest::EresUnittest_ScalarExpr),
		GPOS_UNITTEST_FUNC(CParseHandlerTest::EresUnittest_Statistics),
		GPOS_UNITTEST_FUNC(CParseHandlerTest::EresUnittest_Metadata),
		GPOS_UNITTEST_FUNC(CParseHandlerTest::EresUnittest_MDRequest),
		GPOS_UNITTEST_FUNC(CParseHandlerTest::EresUnittest_RunPlanTests),
		// tests involving dxl representation of queries.
		GPOS_UNITTEST_FUNC(CParseHandlerTest::EresUnittest_RunQueryTests),

		// test that throw XML validation exception
		GPOS_UNITTEST_FUNC_THROW
			(
			CParseHandlerTest::EresUnittest_ErrSAXParseException,
			gpdxl::ExmaDXL,
			gpdxl::ExmiDXLValidationError
			),

		// tests that should throw an exception
		GPOS_UNITTEST_FUNC(CParseHandlerTest::EresUnittest_RunAllNegativeTests),
		};

	// skip OOM and Abort simulation for this test, it takes hours
	if (ITask::PtskSelf()->FTrace(EtraceSimulateOOM) || ITask::PtskSelf()->FTrace(EtraceSimulateAbort))
	{
		return GPOS_OK;
	}

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
Beispiel #10
0
//---------------------------------------------------------------------------
//	@function:
//		COrderSpecTest::EresUnittest
//
//	@doc:
//		Unittest for order spec classes
//
//---------------------------------------------------------------------------
GPOS_RESULT
COrderSpecTest::EresUnittest()
{
	CUnittest rgut[] =
		{
		GPOS_UNITTEST_FUNC(COrderSpecTest::EresUnittest_Basics)
		};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
//---------------------------------------------------------------------------
//	@function:
//		CTableDescriptorTest::EresUnittest
//
//	@doc:
//		Unittest for metadata names
//
//---------------------------------------------------------------------------
GPOS_RESULT
CTableDescriptorTest::EresUnittest()
{
	CUnittest rgut[] =
		{
		GPOS_UNITTEST_FUNC(CTableDescriptorTest::EresUnittest_Basic)
		};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
//---------------------------------------------------------------------------
//	@function:
//		CContradictionTest::EresUnittest
//
//	@doc:
//		Unittest for contradiction detection
//
//---------------------------------------------------------------------------
GPOS_RESULT
CContradictionTest::EresUnittest()
{
	CUnittest rgut[] =
		{
		GPOS_UNITTEST_FUNC(CContradictionTest::EresUnittest_Constraint),
		};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
//---------------------------------------------------------------------------
//	@function:
//		CColRefSetIterTest::EresUnittest
//
//	@doc:
//		Unittest for bit vectors
//
//---------------------------------------------------------------------------
GPOS_RESULT
CColRefSetIterTest::EresUnittest()
{
	CUnittest rgut[] =
		{
		GPOS_UNITTEST_FUNC(CColRefSetIterTest::EresUnittest_Basics)
		};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
//---------------------------------------------------------------------------
//	@function:
//		CCorrelatedExecutionTest::EresUnittest
//
//	@doc:
//		Unittest for converting correlated Apply expressions to NL joins
//
//---------------------------------------------------------------------------
GPOS_RESULT
CCorrelatedExecutionTest::EresUnittest()
{
	CUnittest rgut[] =
		{
		GPOS_UNITTEST_FUNC(CCorrelatedExecutionTest::EresUnittest_RunAllPositiveTests),
		};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
//---------------------------------------------------------------------------
//	@function:
//		CCNFConverterTest::EresUnittest
//
//	@doc:
//		Unittest driver
//
//---------------------------------------------------------------------------
GPOS_RESULT
CCNFConverterTest::EresUnittest()
{
	CUnittest rgut[] =
		{
		//GPOS_UNITTEST_FUNC(CCNFConverterTest::EresUnittest_Basic),
		GPOS_UNITTEST_FUNC(CCNFConverterTest::EresUnittest_AvoidCNFConversion),
		};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}
Beispiel #16
0
//---------------------------------------------------------------------------
//	@function:
//		CTreeMapTest::EresUnittest
//
//	@doc:
//		Unittest for state machine
//
//---------------------------------------------------------------------------
GPOS_RESULT
CTreeMapTest::EresUnittest()
{
	CUnittest rgut[] =
		{
		GPOS_UNITTEST_FUNC(CTreeMapTest::EresUnittest_Basic),
		GPOS_UNITTEST_FUNC(CTreeMapTest::EresUnittest_Count),
		GPOS_UNITTEST_FUNC(CTreeMapTest::EresUnittest_Unrank),
		GPOS_UNITTEST_FUNC(CTreeMapTest::EresUnittest_Memo),

#ifndef GPOS_DEBUG
		GPOS_UNITTEST_FUNC(EresUnittest_FailedPlanEnumerationTests),
#endif // GPOS_DEBUG

#ifdef GPOS_DEBUG
		GPOS_UNITTEST_FUNC_ASSERT(CTreeMapTest::EresUnittest_Cycle),
#endif // GPOS_DEBUG
		};

	return CUnittest::EresExecute(rgut, GPOS_ARRAY_SIZE(rgut));
}