Last change
on this file was 2774, checked in by bird, 19 years ago |
fixed a couple of clipboard issues. seems to work now.
|
File size:
919 bytes
|
Rev | Line | |
---|
[2774] | 1 | /*
|
---|
| 2 | * Testcase used while debugging various bits of the code.
|
---|
| 3 | */
|
---|
| 4 | #include "XBase.h"
|
---|
| 5 | #include "XArch.h"
|
---|
| 6 | #include "CArch.h"
|
---|
| 7 | #include "CUnicode.h"
|
---|
| 8 | #include "CLog.h"
|
---|
| 9 | #include "Version.h"
|
---|
| 10 | #include <stdio.h>
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | int test1()
|
---|
| 15 | {
|
---|
| 16 | CString text = CString("Ah! Megami-Sama!");
|
---|
| 17 | CString utf8Text = CUnicode::textToUTF8(text);
|
---|
| 18 | printf("utf8Text='%s'\n", utf8Text.c_str());
|
---|
| 19 | return 0;
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 |
|
---|
| 23 | int
|
---|
| 24 | main(int argc, char** argv)
|
---|
| 25 | {
|
---|
| 26 | try
|
---|
| 27 | {
|
---|
| 28 | CArch arch;
|
---|
| 29 | CLOG;
|
---|
| 30 |
|
---|
| 31 | test1();
|
---|
| 32 |
|
---|
| 33 | delete CLOG;
|
---|
| 34 | return 0;
|
---|
| 35 | }
|
---|
| 36 | catch (XBase& e)
|
---|
| 37 | {
|
---|
| 38 | printf("Uncaught exception: %s\n", e.what());
|
---|
| 39 | throw;
|
---|
| 40 | }
|
---|
| 41 | catch (XArch& e)
|
---|
| 42 | {
|
---|
| 43 | printf("Initialization failed: %s\n", e.what().c_str());
|
---|
| 44 | return kExitFailed;
|
---|
| 45 | }
|
---|
| 46 | catch (...)
|
---|
| 47 | {
|
---|
| 48 | printf("Uncaught exception: <unknown exception>\n");
|
---|
| 49 | throw;
|
---|
| 50 | }
|
---|
| 51 | }
|
---|
| 52 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.