blob: 53d4158b9d15f39b4d2803ae16fee3ab70c4ead6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
/*=====================================================================
**
** Source: test.c
**
** Purpose: A sample to show how to structure a test case.
**
**
**===================================================================*/
#include <palsuite.h>
int __cdecl main(int argc, char **argv)
{
int exampleInt = 9;
/* Initialize the PAL.
*/
if(0 != PAL_Initialize(argc, argv))
{
return FAIL;
}
Trace("\nTest #2...\n");
#ifdef WIN32
Trace("\nWe are testing under Win32 environment.\n");
#else
Trace("\nWe are testing under Non-Win32 environment.\n");
#endif
if (exampleInt == 9)
{
Fail("This is an example to how to code a failure. "
"This failure was caused by exampleInt equalling %d\n",
exampleInt);
}
/* Shutdown the PAL.
*/
PAL_Terminate();
return PASS;
}
|