tstClipboardServiceHost.cpp revision 2ef891867e61b1018318ef3a47baac5dc9c71504
/* $Id$ */
/** @file
* Shared Clipboard host service test case.
*/
/*
* Copyright (C) 2011 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include "../VBoxClipboard.h"
{
return VBoxHGCMSvcLoad(pTable);
}
static void testSetMode(void)
{
int rc;
RTTestISub("Testing HOST_FN_SET_MODE");
/* Reset global variable which doesn't reset itself. */
1, parms);
("u32Mode=%u\n", (unsigned) u32Mode));
0, parms);
2, parms);
1, parms);
1, parms);
("u32Mode=%u\n", (unsigned) u32Mode));
1, parms);
("u32Mode=%u\n", (unsigned) u32Mode));
}
static void testSetHeadless(void)
{
bool fHeadless;
int rc;
RTTestISub("Testing HOST_FN_SET_HEADLESS");
/* Reset global variable which doesn't reset itself. */
1, parms);
0, parms);
2, parms);
1, parms);
1, parms);
1, parms);
}
static void testHostCall(void)
{
testSetMode();
}
{
/*
* Init the runtime, test and say hello.
*/
const char *pcszExecName;
if (rcExit != RTEXITCODE_SUCCESS)
return rcExit;
/*
* Run the tests.
*/
testHostCall();
/*
* Summary
*/
return RTTestSummaryAndDestroy(hTest);
}
int vboxClipboardInit() { return VINF_SUCCESS; }
void vboxClipboardDestroy() { AssertFailed(); }
int vboxClipboardConnect(_VBOXCLIPBOARDCLIENTDATA*, bool)
{ AssertFailed(); return VERR_WRONG_ORDER; }
void vboxClipboardFormatAnnounce(_VBOXCLIPBOARDCLIENTDATA*, unsigned int)
{ AssertFailed(); }
int vboxClipboardReadData(_VBOXCLIPBOARDCLIENTDATA*, unsigned int, void*, unsigned int, unsigned int*)
{ AssertFailed(); return VERR_WRONG_ORDER; }
void vboxClipboardWriteData(_VBOXCLIPBOARDCLIENTDATA*, void*, unsigned int, unsigned int) { AssertFailed(); }
{ AssertFailed(); return VERR_WRONG_ORDER; }