#include "cpptest.h"

CPPTEST_CONTEXT("/UT_DFBProject/IDirectFBVideoProvider/idirectfbvideoprovider_v4l.c");
CPPTEST_TEST_SUITE_INCLUDED_TO("/UT_DFBProject/IDirectFBVideoProvider/idirectfbvideoprovider_v4l.c");

CPPTEST_TEST_SUITE(TestSuite_idirectfbvideoprovider_v4l_c);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_AddRef_default);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_Release_default);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetCapabilities_default);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetColorAdjustment_default);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetLength_default);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetPos_default);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_SeekTo_default);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetSurfaceDescription_default);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetStreamDescription_default);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_Stop_default);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetStatus_default);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_SetColorAdjustment_default);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_SendEvent_default);
CPPTEST_TEST(TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_PlayTo_default);
CPPTEST_TEST_SUITE_END();
        

void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_AddRef_default();
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_Release_default();
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetCapabilities_default();
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetColorAdjustment_default();
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetLength_default();
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetPos_default();
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_SeekTo_default();
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetSurfaceDescription_default();
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetStreamDescription_default();
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_Stop_default();
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetStatus_default();
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_SetColorAdjustment_default();
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_SendEvent_default();
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_PlayTo_default();
CPPTEST_TEST_SUITE_REGISTRATION(TestSuite_idirectfbvideoprovider_v4l_c);

void TestSuite_idirectfbvideoprovider_v4l_c_setUp()
{
}

void TestSuite_idirectfbvideoprovider_v4l_c_tearDown()
{
}


/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_AddRef_default */
/* CPPTEST_TEST_CASE_CONTEXT DirectResult _IDirectFBVideoProvider_V4L_AddRef(IDirectFBVideoProvider *) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_AddRef_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
    IDirectFBVideoProvider thiz;
    IDirectFBVideoProvider_V4L_data data;

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

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

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_Release_default */
/* CPPTEST_TEST_CASE_CONTEXT DirectResult _IDirectFBVideoProvider_V4L_Release(IDirectFBVideoProvider *) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_Release_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
    IDirectFBVideoProvider thiz;
    IDirectFBVideoProvider_V4L_data data;

    data.ref = 1;
    data.fd = -1;
    thiz.priv = &data;

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

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_GetCapabilities_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBVideoProvider_V4L_GetCapabilities(IDirectFBVideoProvider *, DFBVideoProviderCapabilities *) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetCapabilities_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
	IDirectFBVideoProvider thiz;
	IDirectFBVideoProvider_V4L_data data;

	thiz.priv = &data;

	IDirectFBVideoProvider *_thiz = &thiz;
	IAny * this = (IAny*)_thiz;
	this->magic = 185931549 ;
    /* Initializing argument 2 (caps) */ 
    DFBVideoProviderCapabilities  _caps  ;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBVideoProvider_V4L_GetCapabilities(_thiz, &_caps);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_OK, ( _return ) );
        CPPTEST_ASSERT_EQUAL(( DVCAPS_BASIC | DVCAPS_BRIGHTNESS | DVCAPS_CONTRAST | DVCAPS_HUE | DVCAPS_SATURATION | DVCAPS_INTERLACED ), (_caps));
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBVideoProvider_V4L_GetCapabilities_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_GetColorAdjustment_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBVideoProvider_V4L_GetColorAdjustment(IDirectFBVideoProvider *, DFBColorAdjustment *) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetColorAdjustment_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
	IDirectFBVideoProvider thiz;
	IDirectFBVideoProvider_V4L_data data;

	thiz.priv = &data;

	IDirectFBVideoProvider *_thiz = &thiz;
	IAny * this = (IAny*)_thiz;
	this->magic = 185931549 ;
    /* Initializing argument 2 (adj) */ 
    DFBColorAdjustment  _adj  ;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBVideoProvider_V4L_GetColorAdjustment(_thiz, & _adj);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_OK, ( _return ) );
        CPPTEST_ASSERT_EQUAL((DCAF_BRIGHTNESS | DCAF_CONTRAST | DCAF_HUE | DCAF_SATURATION), (_adj.flags));
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBVideoProvider_V4L_GetColorAdjustment_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_GetLength_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBVideoProvider_V4L_GetLength(IDirectFBVideoProvider *, double *) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetLength_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
	IDirectFBVideoProvider thiz;
	IDirectFBVideoProvider_V4L_data data;

	thiz.priv = &data;

	IDirectFBVideoProvider *_thiz = &thiz;
	IAny * this = (IAny*)_thiz;
	this->magic = 185931549 ;
    /* Initializing argument 2 (seconds) */ 
    double _seconds  = 0 ;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBVideoProvider_V4L_GetLength(_thiz, &_seconds);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_UNSUPPORTED, ( _return ) );
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBVideoProvider_V4L_GetLength_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_GetPos_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBVideoProvider_V4L_GetPos(IDirectFBVideoProvider *, double *) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetPos_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
	IDirectFBVideoProvider thiz;
	IDirectFBVideoProvider_V4L_data data;

	thiz.priv = &data;

	IDirectFBVideoProvider *_thiz = &thiz;
	IAny * this = (IAny*)_thiz;
	this->magic = 185931549 ;
    /* Initializing argument 2 (seconds) */ 
    double _seconds  = 0 ;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBVideoProvider_V4L_GetPos(_thiz, &_seconds);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_UNSUPPORTED, ( _return ) );

    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBVideoProvider_V4L_GetPos_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_SeekTo_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBVideoProvider_V4L_SeekTo(IDirectFBVideoProvider *, double) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_SeekTo_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
	IDirectFBVideoProvider thiz;
	IDirectFBVideoProvider_V4L_data data;

	thiz.priv = &data;

	IDirectFBVideoProvider *_thiz = &thiz;
	IAny * this = (IAny*)_thiz;
	this->magic = 185931549 ;
    /* Initializing argument 2 (seconds) */ 
    double _seconds  = 0.0;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBVideoProvider_V4L_SeekTo(_thiz, _seconds);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_UNIMPLEMENTED, ( _return ) );
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBVideoProvider_V4L_SeekTo_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_GetSurfaceDescription_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBVideoProvider_V4L_GetSurfaceDescription(IDirectFBVideoProvider *, DFBSurfaceDescription *) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetSurfaceDescription_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
	IDirectFBVideoProvider thiz;
	IDirectFBVideoProvider_V4L_data data;

	thiz.priv = &data;

	IDirectFBVideoProvider *_thiz = &thiz;
	IAny * this = (IAny*)_thiz;
	this->magic = 185931549 ;
    /* Initializing argument 2 (desc) */ 
    DFBSurfaceDescription  _desc  ;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBVideoProvider_V4L_GetSurfaceDescription(_thiz, &_desc);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_OK, ( _return ) );
        CPPTEST_ASSERT_EQUAL((DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT | DSDESC_CAPS), (_desc.flags));
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBVideoProvider_V4L_GetSurfaceDescription_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_GetStreamDescription_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBVideoProvider_V4L_GetStreamDescription(IDirectFBVideoProvider *, DFBStreamDescription *) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetStreamDescription_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
	IDirectFBVideoProvider thiz;
	IDirectFBVideoProvider_V4L_data data;

	thiz.priv = &data;

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

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_Stop_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBVideoProvider_V4L_Stop(IDirectFBVideoProvider *) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_Stop_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
	IDirectFBVideoProvider thiz;
	IDirectFBVideoProvider_V4L_data data;

	thiz.priv = &data;

	IDirectFBVideoProvider *_thiz = &thiz;
	IAny * this = (IAny*)_thiz;
	this->magic = 185931549 ;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBVideoProvider_V4L_Stop(_thiz);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_OK, ( _return ) );
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBVideoProvider_V4L_Stop_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_GetStatus_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBVideoProvider_V4L_GetStatus(IDirectFBVideoProvider *, DFBVideoProviderStatus *) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_GetStatus_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
	IDirectFBVideoProvider thiz;
	IDirectFBVideoProvider_V4L_data data;

	thiz.priv = &data;

	IDirectFBVideoProvider *_thiz = &thiz;
	IAny * this = (IAny*)_thiz;
	this->magic = 185931549 ;
    /* Initializing argument 2 (status) */ 
    DFBVideoProviderStatus  _status  ;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBVideoProvider_V4L_GetStatus(_thiz, &_status);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_OK, ( _return ) );
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBVideoProvider_V4L_GetStatus_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_SetColorAdjustment_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBVideoProvider_V4L_SetColorAdjustment(IDirectFBVideoProvider *, const DFBColorAdjustment *) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_SetColorAdjustment_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
	IDirectFBVideoProvider thiz;
	IDirectFBVideoProvider_V4L_data data;

	thiz.priv = &data;

	IDirectFBVideoProvider *_thiz = &thiz;
	IAny * this = (IAny*)_thiz;
	this->magic = 185931549 ;
    /* Initializing argument 2 (adj) */ 
    const DFBColorAdjustment _adj  ;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBVideoProvider_V4L_SetColorAdjustment(_thiz, &_adj);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_OK, ( _return ) );
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBVideoProvider_V4L_SetColorAdjustment_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_SendEvent_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBVideoProvider_V4L_SendEvent(IDirectFBVideoProvider *, const DFBEvent *) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_SendEvent_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
	IDirectFBVideoProvider thiz;
	IDirectFBVideoProvider_V4L_data data;

	thiz.priv = &data;

	IDirectFBVideoProvider *_thiz = &thiz;
	IAny * this = (IAny*)_thiz;
	this->magic = 185931549 ;
    /* Initializing argument 2 (evt) */ 
    const DFBEvent * _evt  = 0 ;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBVideoProvider_V4L_SendEvent(_thiz, _evt);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_UNSUPPORTED, ( _return ) );
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBVideoProvider_V4L_SendEvent_default */

/* CPPTEST_TEST_CASE_BEGIN test__IDirectFBVideoProvider_V4L_PlayTo_default */
/* CPPTEST_TEST_CASE_CONTEXT DFBResult _IDirectFBVideoProvider_V4L_PlayTo(IDirectFBVideoProvider *, IDirectFBSurface *, const DFBRectangle *, DVFrameCallback, void *) */
void TestSuite_idirectfbvideoprovider_v4l_c_test__IDirectFBVideoProvider_V4L_PlayTo_default()
{
    /* Pre-condition initialization */
    /* Initializing argument 1 (thiz) */ 
	IDirectFBVideoProvider thiz;
	IDirectFBVideoProvider_V4L_data data;

	thiz.priv = &data;

	IDirectFBVideoProvider *_thiz = &thiz;
	IAny * this = (IAny*)_thiz;
	this->magic = 185931549 ;
    /* Initializing argument 2 (destination) */
    IDirectFBSurface _destination ;
    CoreSurface _surf;
    _surf.config.format = DSPF_YUY2;
    DFBRectangle _my_rect = {0, 0, 10, 10};
    IDirectFBSurface_data _sur_data;

    _sur_data.surface = & _surf;
    _sur_data.area.current = _my_rect;
    _sur_data.area.wanted = _my_rect;

    _destination.priv = & _sur_data;
    /* Initializing argument 3 (dstrect) */ 
    const DFBRectangle  _dstrect = _my_rect;
    /* Initializing argument 4 (callback) */ 
    DVFrameCallback _callback  = 0 ;
    /* Initializing argument 5 (ctx) */ 
    void * _ctx  = 0 ;
    {
        /* Tested function call */
        DFBResult _return  = _IDirectFBVideoProvider_V4L_PlayTo(_thiz, &_destination, &_dstrect, _callback, _ctx);
        /* Post-condition check */
        CPPTEST_ASSERT_EQUAL( DFB_OK, ( _return ) );
    }
}
/* CPPTEST_TEST_CASE_END test__IDirectFBVideoProvider_V4L_PlayTo_default */
