#include "cpptest.h"

CPPTEST_CONTEXT("/UT_DFBProject/IDirectFBImageProvider/idirectfbimageprovider_gopc.c");
CPPTEST_TEST_SUITE_INCLUDED_TO("/UT_DFBProject/IDirectFBImageProvider/idirectfbimageprovider_gopc.c");

CPPTEST_TEST_SUITE(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcClose_default);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOpen_EnableIntr_fail);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOpen_Enable_fail);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOpen_success);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOneFrameDone_timeout_fail);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOneFrameDone_dwin_fail);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOneFrameDone_success);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcUpdateDWinProperty_default);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcInit_Frame_WithOSD);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_AddRef_default);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_GetImageDescription_default);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_GetSurfaceDescription_default);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_Release_default);
CPPTEST_TEST(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_SetRenderCallback_default);
CPPTEST_TEST_SUITE_END();
        

void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcClose_default();
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOpen_EnableIntr_fail();
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOpen_Enable_fail();
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOpen_success();
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOneFrameDone_timeout_fail();
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOneFrameDone_dwin_fail();
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOneFrameDone_success();
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcUpdateDWinProperty_default();
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcInit_Frame_WithOSD();
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_AddRef_default();
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_GetImageDescription_default();
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_GetSurfaceDescription_default();
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_Release_default();
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_SetRenderCallback_default();
CPPTEST_TEST_SUITE_REGISTRATION(TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b);

extern bool bRunInMock_MApi_GOP_DWIN_EnableIntr;
extern bool bRunInMock_MApi_GOP_DWIN_Enable;
extern bool bRunInMock_MApi_GOP_GWIN_SetForceWrite;
extern bool bRunInMock_MApi_GOP_DWIN_GetDWinIntInfoTimeout;
extern bool bRunInMock_MApi_GOP_DWIN_SetWinProperty;


void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_setUp()
{
}

void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_tearDown()
{
}


/* CPPTEST_TEST_CASE_BEGIN test_gopcClose_default */
/* CPPTEST_TEST_CASE_CONTEXT _Bool gopcClose(IDirectFBImageProvider_GOPC_data *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcClose_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (data) */ 
    IDirectFBImageProvider_GOPC_data * _data  = 0 ;
    {
    	bRunInMock_MApi_GOP_DWIN_EnableIntr      = false;
    	bRunInMock_MApi_GOP_DWIN_Enable          = false;
    	bRunInMock_MApi_GOP_GWIN_SetForceWrite   = false;
        /* Tested function call */
        _Bool _return  = gopcClose(_data);

        CPPTEST_ASSERT_EQUAL( true, ( _return ) );
        //CPPTEST_ASSERT_BOOL_EQUAL(true, bRunInMock_MApi_GOP_DWIN_EnableIntr);
        //CPPTEST_ASSERT_BOOL_EQUAL(true, bRunInMock_MApi_GOP_DWIN_Enable);
        //CPPTEST_ASSERT_BOOL_EQUAL(true, bRunInMock_MApi_GOP_GWIN_SetForceWrite);
        /* Post-condition check */
        //CPPTEST_POST_CONDITION_BOOL(" _return", ( _return ));
       //CPPTEST_POST_CONDITION_PTR("IDirectFBImageProvider_GOPC_data * _data ", ( _data ));
    }
}
/* CPPTEST_TEST_CASE_END test_gopcClose_default */

/* CPPTEST_TEST_CASE_BEGIN test_gopcOpen_EnableIntr_fail */
/* CPPTEST_TEST_CASE_CONTEXT _Bool gopcOpen(IDirectFBImageProvider_GOPC_data *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOpen_EnableIntr_fail()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (data) */ 
    IDirectFBImageProvider_GOPC_data * _data  = 0 ;
    {
    	bRunInMock_MApi_GOP_DWIN_EnableIntr      = false;
        /* Tested function call */
        _Bool _return  = gopcOpen(_data);

        CPPTEST_ASSERT_EQUAL( true, ( _return ) );
        //CPPTEST_ASSERT_BOOL_EQUAL(true, bRunInMock_MApi_GOP_DWIN_EnableIntr);
        /* Post-condition check */
        //CPPTEST_POST_CONDITION_BOOL(" _return", ( _return ));
        //CPPTEST_POST_CONDITION_PTR("IDirectFBImageProvider_GOPC_data * _data ", ( _data ));
    }
}
/* CPPTEST_TEST_CASE_END test_gopcOpen_EnableIntr_fail */

/* CPPTEST_TEST_CASE_BEGIN test_gopcOpen_Enable_fail */
/* CPPTEST_TEST_CASE_CONTEXT _Bool gopcOpen(IDirectFBImageProvider_GOPC_data *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOpen_Enable_fail()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (data) */ 
    IDirectFBImageProvider_GOPC_data * _data  = 0 ;
    {
    	bRunInMock_MApi_GOP_DWIN_EnableIntr      = false;
    	bRunInMock_MApi_GOP_DWIN_Enable          = false;
        /* Tested function call */
        _Bool _return  = gopcOpen(_data);

        CPPTEST_ASSERT_EQUAL( true, ( _return ) );
        //CPPTEST_ASSERT_BOOL_EQUAL(true, bRunInMock_MApi_GOP_DWIN_EnableIntr);
        //CPPTEST_ASSERT_BOOL_EQUAL(true, bRunInMock_MApi_GOP_DWIN_Enable);
        /* Post-condition check */
        //CPPTEST_POST_CONDITION_BOOL(" _return", ( _return ));
        //CPPTEST_POST_CONDITION_PTR("IDirectFBImageProvider_GOPC_data * _data ", ( _data ));
    }
}
/* CPPTEST_TEST_CASE_END test_gopcOpen_Enable_fail */

/* CPPTEST_TEST_CASE_BEGIN test_gopcOpen_success */
/* CPPTEST_TEST_CASE_CONTEXT _Bool gopcOpen(IDirectFBImageProvider_GOPC_data *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOpen_success()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (data) */ 
    IDirectFBImageProvider_GOPC_data * _data  = 0 ;
    {
    	bRunInMock_MApi_GOP_DWIN_EnableIntr      = false;
    	bRunInMock_MApi_GOP_DWIN_Enable          = false;
        /* Tested function call */
        _Bool _return  = gopcOpen(_data);

        CPPTEST_ASSERT_EQUAL( true, ( _return ) );
        //CPPTEST_ASSERT_BOOL_EQUAL(true, bRunInMock_MApi_GOP_DWIN_EnableIntr);
        //CPPTEST_ASSERT_BOOL_EQUAL(true, bRunInMock_MApi_GOP_DWIN_Enable);
        /* Post-condition check */
        //CPPTEST_POST_CONDITION_BOOL(" _return", ( _return ));
        //CPPTEST_POST_CONDITION_PTR("IDirectFBImageProvider_GOPC_data * _data ", ( _data ));
    }
}
/* CPPTEST_TEST_CASE_END test_gopcOpen_success */

/* CPPTEST_TEST_CASE_BEGIN test_gopcOneFrameDone_timeout_fail */
/* CPPTEST_TEST_CASE_CONTEXT _Bool gopcOneFrameDone(IDirectFBImageProvider_GOPC_data *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOneFrameDone_timeout_fail()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (data) */ 
    IDirectFBImageProvider_GOPC_data * _data  = 0 ;
    {
    	bRunInMock_MApi_GOP_DWIN_GetDWinIntInfoTimeout      = false;
        /* Tested function call */
        _Bool _return  = gopcOneFrameDone(_data);

        CPPTEST_ASSERT_EQUAL( true, ( _return ) );
        //CPPTEST_ASSERT_BOOL_EQUAL(true, bRunInMock_MApi_GOP_DWIN_GetDWinIntInfoTimeout);

        /* Post-condition check */
        //CPPTEST_POST_CONDITION_BOOL(" _return", ( _return ));
        //CPPTEST_POST_CONDITION_PTR("IDirectFBImageProvider_GOPC_data * _data ", ( _data ));
    }
}
/* CPPTEST_TEST_CASE_END test_gopcOneFrameDone_timeout_fail */

/* CPPTEST_TEST_CASE_BEGIN test_gopcOneFrameDone_dwin_fail */
/* CPPTEST_TEST_CASE_CONTEXT _Bool gopcOneFrameDone(IDirectFBImageProvider_GOPC_data *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOneFrameDone_dwin_fail()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (data) */ 
    IDirectFBImageProvider_GOPC_data * _data  = 0 ;
    {
    	bRunInMock_MApi_GOP_DWIN_GetDWinIntInfoTimeout      = false;
        /* Tested function call */
        _Bool _return  = gopcOneFrameDone(_data);

        CPPTEST_ASSERT_EQUAL( true, ( _return ) );
        //CPPTEST_ASSERT_BOOL_EQUAL(true, bRunInMock_MApi_GOP_DWIN_GetDWinIntInfoTimeout);
        /* Post-condition check */
        //CPPTEST_POST_CONDITION_BOOL(" _return", ( _return ));
        //CPPTEST_POST_CONDITION_PTR("IDirectFBImageProvider_GOPC_data * _data ", ( _data ));
    }
}
/* CPPTEST_TEST_CASE_END test_gopcOneFrameDone_dwin_fail */

/* CPPTEST_TEST_CASE_BEGIN test_gopcOneFrameDone_success */
/* CPPTEST_TEST_CASE_CONTEXT _Bool gopcOneFrameDone(IDirectFBImageProvider_GOPC_data *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcOneFrameDone_success()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (data) */ 
    IDirectFBImageProvider_GOPC_data * _data  = 0 ;
    {
    	bRunInMock_MApi_GOP_DWIN_GetDWinIntInfoTimeout      = false;
        /* Tested function call */
        _Bool _return  = gopcOneFrameDone(_data);

        CPPTEST_ASSERT_EQUAL( true, ( _return ) );
        //CPPTEST_ASSERT_BOOL_EQUAL(true, bRunInMock_MApi_GOP_DWIN_GetDWinIntInfoTimeout);
        /* Post-condition check */
        //CPPTEST_POST_CONDITION_BOOL(" _return", ( _return ));
        //CPPTEST_POST_CONDITION_PTR("IDirectFBImageProvider_GOPC_data * _data ", ( _data ));
    }
}
/* CPPTEST_TEST_CASE_END test_gopcOneFrameDone_success */

/* CPPTEST_TEST_CASE_BEGIN test_gopcUpdateDWinProperty_default */
/* CPPTEST_TEST_CASE_CONTEXT _Bool gopcUpdateDWinProperty(IDirectFBImageProvider_GOPC_data *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcUpdateDWinProperty_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (data) */ 
	IDirectFBImageProvider_GOPC_data data;
    IDirectFBImageProvider_GOPC_data * _data  = &data ;
	data.gopc_capture_format = DWIN_DATA_FMT_ARGB8888;
	data.gopc_capture_src = IMG_DWIN_SRC_FRAME;
	data.gopc_capture_x = 100;
	data.gopc_capture_y = 100;
	data.gopc_capture_w = 100;
	data.gopc_capture_h = 100;
    {
		bRunInMock_MApi_GOP_DWIN_SetWinProperty = false;
        /* Tested function call */
        _Bool _return  = gopcUpdateDWinProperty(_data);

        //CPPTEST_ASSERT_EQUAL( true, ( _return ) );
        //CPPTEST_ASSERT_BOOL_EQUAL(true, bRunInMock_MApi_GOP_DWIN_SetWinProperty);
        /* Post-condition check */
        //CPPTEST_POST_CONDITION_BOOL(" _return", ( _return ));
        //CPPTEST_POST_CONDITION_PTR("IDirectFBImageProvider_GOPC_data * _data ", ( _data ));
    }
}
/* CPPTEST_TEST_CASE_END test_gopcUpdateDWinProperty_default */

/* CPPTEST_TEST_CASE_BEGIN test_gopcInit_Frame_WithOSD */
/* CPPTEST_TEST_CASE_CONTEXT _Bool gopcInit(IDirectFBImageProvider_GOPC_data *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test_gopcInit_Frame_WithOSD()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (data) */ 
	IDirectFBImageProvider_GOPC_data data;
    IDirectFBImageProvider_GOPC_data * _data  = &data ;
    data.gopc_capture_src = IMG_DWIN_SRC_FRAME_WITHOSD;
    {
        /* Tested function call */
        _Bool _return  = gopcInit(_data);

        CPPTEST_ASSERT_EQUAL( true, ( _return ) );
        /* Post-condition check */
        //CPPTEST_POST_CONDITION_BOOL(" _return", ( _return ));
        //CPPTEST_POST_CONDITION_PTR("IDirectFBImageProvider_GOPC_data * _data ", ( _data ));
    }
}
/* CPPTEST_TEST_CASE_END test_gopcInit_Frame_WithOSD */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBImageProvider_GOPC_AddRef_default */
/* CPPTEST_TEST_CASE_CONTEXT DirectResult _IDirectFBImageProvider_GOPC_AddRef(IDirectFBImageProvider *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_AddRef_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */
	IDirectFBImageProvider thiz ;
	IDirectFBImageProvider_GOPC_data data;

	data.ref = 0;
	thiz.priv = & data;

	IDirectFBImageProvider * _thiz  = &thiz ;
    IAny * this = (IAny*)_thiz;
    this->magic = 185931549 ;
    {
        /* Tested function call */
        DirectResult _return  = _IDirectFBImageProvider_GOPC_AddRef(_thiz);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DR_OK, ( _return ) );
        CPPTEST_ASSERT_EQUAL( 1, ( data.ref ) );
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBImageProvider_GOPC_AddRef_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBImageProvider_GOPC_GetImageDescription_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBImageProvider_GOPC_GetImageDescription(IDirectFBImageProvider *, DFBImageDescription *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_GetImageDescription_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */
	IDirectFBImageProvider thiz ;
	IDirectFBImageProvider_GOPC_data data;

	thiz.priv = & data;

	IDirectFBImageProvider * _thiz  = &thiz ;
    IAny * this = (IAny*)_thiz;
    this->magic = 185931549 ;
    /* Initializing argument 2 (desc) */
    DFBImageDescription _desc ;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBImageProvider_GOPC_GetImageDescription(_thiz, & _desc);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_OK, ( _return ) );
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBImageProvider_GOPC_GetImageDescription_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBImageProvider_GOPC_GetSurfaceDescription_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBImageProvider_GOPC_GetSurfaceDescription(IDirectFBImageProvider *, DFBSurfaceDescription *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_GetSurfaceDescription_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */
	IDirectFBImageProvider thiz ;
	IDirectFBImageProvider_GOPC_data data;
	CoreSurface _surf;

	_surf.config.format = 0;
	data.source = & _surf;
	data.gopc_capture_w = 10;
	data.gopc_capture_h = 20;

	thiz.priv = & data;

	IDirectFBImageProvider * _thiz  = &thiz ;
    IAny * this = (IAny*)_thiz;
    this->magic = 185931549 ;
    /* Initializing argument 2 (desc) */
    DFBSurfaceDescription _desc ;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBImageProvider_GOPC_GetSurfaceDescription(_thiz, &_desc);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_OK, ( _return ) );
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBImageProvider_GOPC_GetSurfaceDescription_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBImageProvider_GOPC_Release_default */
/* CPPTEST_TEST_CASE_CONTEXT DirectResult _IDirectFBImageProvider_GOPC_Release(IDirectFBImageProvider *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_Release_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */
	IDirectFBImageProvider thiz ;
	IDirectFBImageProvider_GOPC_data data;
	CoreSurface _surf;

	_surf.config.format = 0;
	data.source = & _surf;
	data.ref = 1;
	thiz.priv = & data;

	IDirectFBImageProvider * _thiz  = &thiz ;
    IAny * this = (IAny*)_thiz;
    this->magic = 185931549 ;
    {
        /* Tested function call */
        DirectResult _return  = _IDirectFBImageProvider_GOPC_Release(_thiz);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DR_OK, ( _return ) );
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBImageProvider_GOPC_Release_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBImageProvider_GOPC_SetRenderCallback_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBImageProvider_GOPC_SetRenderCallback(IDirectFBImageProvider *, DIRenderCallback, void *) */
void TestSuite_idirectfbimageprovider_gopc_c_2ef2c73b_test__IDirectFBImageProvider_GOPC_SetRenderCallback_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */
	IDirectFBImageProvider thiz ;
	IDirectFBImageProvider_GOPC_data data;

	thiz.priv = & data;

	IDirectFBImageProvider * _thiz  = &thiz ;
    IAny * this = (IAny*)_thiz;
    this->magic = 185931549 ;
    /* Initializing argument 2 (callback) */
    DIRenderCallback _callback  = 0 ;
    /* Initializing argument 3 (context) */
    void * _context  = 0 ;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBImageProvider_GOPC_SetRenderCallback(_thiz, _callback, _context);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_OK, ( _return ) );
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBImageProvider_GOPC_SetRenderCallback_default */
