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: test1.c
8**
9** Purpose: Test #1 for the wprintf function. A single, basic, test
10** case with no formatting.
11**
12**
13**==========================================================================*/
14
15
16
17#include <palsuite.h>
18#include "../wprintf.h"
19
20int __cdecl main(int argc, char *argv[])
21{
22 char checkstr[] = "hello world";
23 WCHAR *wcheckstr;
24 int ret;
25
26
27 if (PAL_Initialize(argc, argv))
28 {
29 return FAIL;
30 }
31
32 wcheckstr = convert(checkstr);
33
34 ret = wprintf(wcheckstr);
35
36 if (ret != wcslen(wcheckstr))
37 {
38 Fail("Expected wprintf to return %d, got %d.\n",
39 wcslen(wcheckstr), ret);
40
41 }
42
43 free(wcheckstr);
44 PAL_Terminate();
45 return PASS;
46}
47
48