3 #include "../lstrings.h"
8 using namespace lyx::support;
15 cout << to_ascii(docstring(1, lowercase(char_type('A')))) << endl;
16 cout << to_ascii(lowercase(from_ascii("AlLe"))) << endl;
17 cout << lowercase('A') << endl;
18 cout << ascii_lowercase("AlLe") << endl;
23 cout << to_ascii(docstring(1, uppercase(char_type('a')))) << endl;
24 cout << to_ascii(uppercase(from_ascii("AlLe"))) << endl;
25 cout << uppercase('a') << endl;
28 void test_formatFPNumber()
30 double const numbers[] = {
34 1.3754937356458394574047e-20,
35 1.3754937356458394574047e-19,
36 1.3754937356458394574047e-18,
37 1.3754937356458394574047e-17,
38 1.3754937356458394574047e-16,
39 1.3754937356458394574047e-15,
40 1.3754937356458394574047e-14,
41 1.3754937356458394574047e-13,
42 1.3754937356458394574047e-12,
43 1.3754937356458394574047e-11,
44 1.3754937356458394574047e-10,
45 1.3754937356458394574047e-9,
46 1.3754937356458394574047e-8,
47 1.3754937356458394574047e-7,
48 1.3754937356458394574047e-6,
49 1.3754937356458394574047e-5,
50 1.3754937356458394574047e-4,
51 1.3754937356458394574047e-3,
52 1.3754937356458394574047e-2,
53 1.3754937356458394574047e-1,
54 1.3754937356458394574047,
55 1.3754937356458394574047e1,
56 1.3754937356458394574047e2,
57 1.3754937356458394574047e3,
58 1.3754937356458394574047e4,
59 1.3754937356458394574047e5,
60 1.3754937356458394574047e6,
61 1.3754937356458394574047e7,
62 1.3754937356458394574047e8,
63 1.3754937356458394574047e9,
64 1.3754937356458394574047e10,
65 1.3754937356458394574047e11,
66 1.3754937356458394574047e12,
67 1.3754937356458394574047e13,
68 1.3754937356458394574047e14,
69 1.3754937356458394574047e15,
70 1.3754937356458394574047e16,
71 1.3754937356458394574047e17,
72 1.3754937356458394574047e18,
73 1.3754937356458394574047e19,
74 1.3754937356458394574047e20,
78 int const n = sizeof(numbers) / sizeof(numbers[0]);
79 for (int i = 0; i < n; ++i)
80 cout << formatFPNumber(numbers[i]) << endl;
81 for (int i = 0; i < n; ++i)
82 cout << formatFPNumber(-numbers[i]) << endl;
89 test_formatFPNumber();