1 /*
2  * Copyright (C) 2011 by ARM Ltd. All rights reserved.
3  *
4  * Permission to use, copy, modify, and distribute this software
5  * is freely granted, provided that this notice is preserved.
6  */
7 
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <wchar.h>
11 #include "check.h"
12 
main(void)13 int main(void)
14 {
15 #if defined(INTEGER_ONLY) || defined(NO_FLOATING_POINT)
16 
17 #else
18   char cbuf[512];
19   wchar_t wcbuf[512], wcbuf2[512];
20   double val = 1E+30;
21   snprintf(cbuf, 512, "%.*f", 3, val);
22   swprintf(wcbuf, 512, L"%.*f", 3, val);
23   mbstowcs(wcbuf2, cbuf, 512);
24 
25   CHECK (wcscmp(wcbuf, wcbuf2) == 0);
26 #endif
27 
28   exit (0);
29 }
30