struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / idf_ucn_utf8.c
blob8a4ad15ff334886791569badc72e4b2aa0954637
1 /** Test UCNs and utf8 in identifiers
2 */
3 #include <testfwk.h>
5 #if !defined(PORT_HOST) && !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
6 const unsigned long µ_div = 1000;
7 #endif
9 void
10 testShadowing(void)
12 #if !defined(PORT_HOST) && !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
13 const unsigned long \u00b5_div = 1000000uL;
14 ASSERT(µ_div == 1000000uL);
15 ASSERT(\u00B5_div == 1000000uL);
16 #endif
19 void
20 testAssignment(void)
22 #if !defined(PORT_HOST) && !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
23 int \u00F6 = 0;
24 \u00f6 = 1;
25 ö = 2;
26 ASSERT(\U000000F6 == 2);
27 #endif
30 void
31 testSquared(void)
33 #if !defined(PORT_HOST) && !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
34 const float e = 2.71828182846;
35 const float= e * e;
36 const float e_squared = e * e;
37 ASSERT(e\u00B2 == e_squared);
38 #endif