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 <newlib.h>
10 #include <stdlib.h>
11 #include <wchar.h>
12 #include "check.h"
13 
main(void)14 int main(void)
15 {
16 #if defined(INTEGER_ONLY) || defined(NO_FLOATING_POINT)
17 
18 #else
19   char cbuf[512];
20   wchar_t wcbuf[512], wcbuf2[512];
21   double val = 1E+30;
22   snprintf(cbuf, 512, "%.*f", 3, val);
23   swprintf(wcbuf, 512, L"%.*f", 3, val);
24   mbstowcs(wcbuf2, cbuf, 512);
25 
26   CHECK (wcscmp(wcbuf, wcbuf2) == 0);
27 #endif
28 
29   exit (0);
30 }
31