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: Test #3 for the wcstoul function |
10 | ** |
11 | ** |
12 | **==========================================================================*/ |
13 | #include <palsuite.h> |
14 | |
15 | /* |
16 | * Notes: wcstoul should depend on the current locale's LC_NUMERIC category, |
17 | * this is not currently tested. |
18 | */ |
19 | |
20 | |
21 | int __cdecl main(int argc, char *argv[]) |
22 | { |
23 | WCHAR str[] = {'Z',0}; |
24 | WCHAR *end; |
25 | ULONG l; |
26 | |
27 | if (0 != PAL_Initialize(argc, argv)) |
28 | { |
29 | return FAIL; |
30 | } |
31 | |
32 | |
33 | l = wcstoul(str, &end, 10); |
34 | |
35 | if (l != 0) |
36 | { |
37 | Fail("ERROR: Expected wcstoul to return %u, got %u\n" , 0, l); |
38 | } |
39 | |
40 | if (end != str) |
41 | { |
42 | Fail("ERROR: Expected wcstoul to give an end value of %p, got %p\n" , |
43 | str, end); |
44 | } |
45 | |
46 | PAL_Terminate(); |
47 | return PASS; |
48 | } |
49 | |
50 | |