language-extensions/R/test/src/RExtensionLibraryApiTests.cpp
//----------------------------------------------------------------------------------------------
// Name: RExtensionLibraryApiTests::GetHandles
//
// Description:
//  Gets handles to install and uninstall library API functions
//  as well as to the Embedded R environment via RInside.
//
:GetHandles
Description:
Gets handles to install and uninstall library API functions
as well as to the Embedded R environment via RInside.
: GetHandles Description : Gets handles to install and uninstall library API functions as well as to the Embedded R environment via RInside .
void RExtensionLibraryApiTests::GetHandles()
	{
		sm_installExternalLibraryFuncPtr = reinterpret_cast<FN_installExternalLibrary*>(
			Utilities::CrossPlatGetFunctionFromLibHandle(
				sm_libHandle,
				"InstallExternalLibrary"));
		ASSERT_TRUE(sm_installExternalLibraryFuncPtr != nullptr);
		sm_uninstallExternalLibraryFuncPtr = reinterpret_cast<FN_uninstallExternalLibrary*>(
			Utilities::CrossPlatGetFunctionFromLibHandle(
				sm_libHandle,
				"UninstallExternalLibrary"));
		ASSERT_TRUE(sm_uninstallExternalLibraryFuncPtr != nullptr);
		sm_executeScriptFuncPtr = reinterpret_cast<FN_executeScript*>(
			Utilities::CrossPlatGetFunctionFromLibHandle(
				sm_libHandle,
				"ExecuteScript"));
		ASSERT_TRUE(sm_executeScriptFuncPtr != nullptr);
		sm_executeScriptAndGetResultFuncPtr = reinterpret_cast<FN_executeScriptAndGetResult*>(
			Utilities::CrossPlatGetFunctionFromLibHandle(
				sm_libHandle,
				"ExecuteScriptAndGetResult"));
		ASSERT_TRUE(sm_executeScriptAndGetResultFuncPtr != nullptr);
	}
void RExtensionLibraryApiTests :: GetHandles ( ) { sm_installExternalLibraryFuncPtr = reinterpret_cast < FN_installExternalLibrary * > ( Utilities :: CrossPlatGetFunctionFromLibHandle ( sm_libHandle , " " ) ) ; ASSERT_TRUE ( sm_installExternalLibraryFuncPtr != nullptr ) ; sm_uninstallExternalLibraryFuncPtr = reinterpret_cast < FN_uninstallExternalLibrary * > ( Utilities :: CrossPlatGetFunctionFromLibHandle ( sm_libHandle , " " ) ) ; ASSERT_TRUE ( sm_uninstallExternalLibraryFuncPtr != nullptr ) ; sm_executeScriptFuncPtr = reinterpret_cast < FN_executeScript * > ( Utilities :: CrossPlatGetFunctionFromLibHandle ( sm_libHandle , " " ) ) ; ASSERT_TRUE ( sm_executeScriptFuncPtr != nullptr ) ; sm_executeScriptAndGetResultFuncPtr = reinterpret_cast < FN_executeScriptAndGetResult * > ( Utilities :: CrossPlatGetFunctionFromLibHandle ( sm_libHandle , " " ) ) ; ASSERT_TRUE ( sm_executeScriptAndGetResultFuncPtr != nullptr ) ; }
Name: RExtensionLibraryApiTests::GetHandles
Description:
Gets handles to install and uninstall library API functions
as well as to the Embedded R environment via RInside.
Name : RExtensionLibraryApiTests :: GetHandles Description : Gets handles to install and uninstall library API functions as well as to the Embedded R environment via RInside .