diff options
author | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
---|---|---|
committer | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
commit | e611b132f9b8abe35b362e5870b74bce94a1e58e (patch) | |
tree | a5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/tapi/qa/trapper/itest/tcline/ittrd.c | |
download | NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2 NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip |
Diffstat (limited to 'private/tapi/qa/trapper/itest/tcline/ittrd.c')
-rw-r--r-- | private/tapi/qa/trapper/itest/tcline/ittrd.c | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/private/tapi/qa/trapper/itest/tcline/ittrd.c b/private/tapi/qa/trapper/itest/tcline/ittrd.c new file mode 100644 index 000000000..80150d1a3 --- /dev/null +++ b/private/tapi/qa/trapper/itest/tcline/ittrd.c @@ -0,0 +1,123 @@ + +/*++ + +Copyright (c) 1995 Microsoft Corporation + +Module Name: + + ittrd.c + +Abstract: + + This module contains the test functions for tapiRequestDrop + +Author: + + Xiao Ying Ding (XiaoD) 30-Jan-1996 + +Revision History: + +--*/ + + +#include "windows.h" +#include "malloc.h" +#include "string.h" +#include "tapi.h" +#include "trapper.h" +#include "tcore.h" +#include "ttest.h" +#include "doline.h" +#include "vars.h" +#include "cline.h" + + + +// tapiRequestDrop +// +// The following tests are made: +// +// Tested Notes +// ------------------------------------------------------------------------- +// Go/No-Go test +// +// * = Stand-alone test case +// +// + +BOOL TestTapiRequestDrop(BOOL fQuietMode, BOOL fStandAlone) +{ + LPTAPILINETESTINFO lpTapiLineTestInfo; + INT n; + LPCALLBACKPARAMS lpCallbackParams; + ESPDEVSPECIFICINFO info; + BOOL fTestPassed = TRUE; + + InitTestNumber(); + TapiLineTestInit(); + lpTapiLineTestInfo = GetLineTestInfo(); + + OutputTAPIDebugInfo( + DBUG_SHOW_DETAIL, + "\n*****************************************************************************************"); + + TapiLogDetail( + DBUG_SHOW_PASS, + ">>>>>>>> Begin testing tapiRequestDrop <<<<<<<<" + ); + + TapiLogDetail( + DBUG_SHOW_PASS, + ">> Test Case %ld: invalid hwnd handles", dwTestCase + 1); + + + for (n = 0; n < NUMINVALIDHANDLES; n++) + { + TapiLogDetail( + DBUG_SHOW_DETAIL, + "n= %ld", n); + lpTapiLineTestInfo->hwnd = (HWND) gdwInvalidHandles[n]; + if (! DoTapiRequestDrop(lpTapiLineTestInfo, TAPIERR_INVALWINDOWHANDLE)) + { + fTestPassed = FALSE; + } + } + fTestPassed = ShowTestCase(fTestPassed); + + + TapiLogDetail( + DBUG_SHOW_PASS, + ">> Test Case %ld: return REQUESTFAILED", dwTestCase + 1 + ); + + lpTapiLineTestInfo->hwnd = (HWND) GetTopWindow(NULL); + lpTapiLineTestInfo->wRequestID = 0; + + if (! DoTapiRequestDrop(lpTapiLineTestInfo, TAPIERR_REQUESTFAILED)) + { + fTestPassed = FALSE; + } + + fTestPassed = ShowTestCase(fTestPassed); + + TapiLogDetail( + DBUG_SHOW_PASS, + "@@ tapiRequestDrop: Total Test Case = %ld, Passed = %ld, Failed = %ld", + dwTestCase, dwTestCasePassed, dwTestCaseFailed); + TapiLogDetail( + DBUG_SHOW_PASS, + "@@ Total Test Case = %ld, Passed = %ld, Failed = %ld", + dwglTestCase, dwglTestCasePassed, dwglTestCaseFailed); + if(dwTestCaseFailed > 0) + fTestPassed = FALSE; + + TapiLogDetail( + DBUG_SHOW_PASS, + ">>>>>>>> End testing tapiRequestDrop <<<<<<<<" + ); + + + return fTestPassed; +} + + |