]> git.lyx.org Git - lyx.git/blob - src/support/tests/check_lstrings.cpp
remove unnecessary Carbon include
[lyx.git] / src / support / tests / check_lstrings.cpp
1 #include <config.h>
2
3 #include "../lstrings.h"
4
5 #include <iostream>
6
7
8 using namespace lyx::support;
9 using namespace lyx;
10
11 using namespace std;
12
13 namespace lyx {
14         // Dummy LyXRC support
15         struct LyXRC { string icon_set; } lyxrc;
16
17         // Keep the linker happy on Windows
18         void lyx_exit(int) {}
19
20         docstring const _(string const & s) { return from_ascii(s); }
21 }
22
23 void test_lowercase()
24 {
25         cout << to_ascii(docstring(1, lowercase(char_type('A')))) << endl;
26         cout << to_ascii(lowercase(from_ascii("AlLe"))) << endl;
27         cout << lowercase('A') << endl;
28         cout << ascii_lowercase("AlLe") << endl;
29 }
30
31 void test_uppercase()
32 {
33         cout << to_ascii(docstring(1, uppercase(char_type('a')))) << endl;
34         cout << to_ascii(uppercase(from_ascii("AlLe"))) << endl;
35         cout << uppercase('a') << endl;
36 }
37
38 int main()
39 {
40         test_lowercase();
41         test_uppercase();
42 }