| 1 | // Licensed to the .NET Foundation under one or more agreements. |
| 2 | // The .NET Foundation licenses this file to you under the MIT license. |
| 3 | // See the LICENSE file in the project root for more information. |
| 4 | |
| 5 | /*============================================================================= |
| 6 | ** |
| 7 | ** Source: test3.c |
| 8 | ** |
| 9 | ** Purpose: Positive test for ExitProcess. |
| 10 | ** |
| 11 | ** Dependencies: PAL_Initialize |
| 12 | ** PAL_Terminate |
| 13 | ** |
| 14 | |
| 15 | ** |
| 16 | **===========================================================================*/ |
| 17 | #include <palsuite.h> |
| 18 | |
| 19 | |
| 20 | |
| 21 | int __cdecl main( int argc, char **argv ) |
| 22 | |
| 23 | { |
| 24 | /* initialize the PAL */ |
| 25 | if( PAL_Initialize(argc, argv) != 0 ) |
| 26 | { |
| 27 | return( FAIL ); |
| 28 | } |
| 29 | |
| 30 | /* terminate the PAL */ |
| 31 | PAL_Terminate(); |
| 32 | |
| 33 | /* call ExitProcess() -- should work after PAL_Terminate() */ |
| 34 | ExitProcess( PASS ); |
| 35 | |
| 36 | |
| 37 | /* return failure if we reach here -- note no attempt at */ |
| 38 | /* meaningful output because we've called PAL_Terminte(). */ |
| 39 | return FAIL; |
| 40 | } |
| 41 | |