diff options
author | anonymous <local@localhost> | 2010-09-29 23:20:49 +0000 |
---|---|---|
committer | anonymous <local@localhost> | 2010-09-29 23:20:58 +0000 |
commit | a283c64f6b95ec2db1b4b6004f27b1e448961e73 (patch) | |
tree | 01d89942a1ba29a1ce64127911bdf978d80cef87 /test/test.cc | |
parent | becd5d8b40af38d97134dfb491f109e0d1688976 (diff) | |
download | libcxxrt-a283c64f6b95ec2db1b4b6004f27b1e448961e73.tar.gz libcxxrt-a283c64f6b95ec2db1b4b6004f27b1e448961e73.tar.bz2 libcxxrt-a283c64f6b95ec2db1b4b6004f27b1e448961e73.tar.xz |
Add __cxa_demangle support
Diffstat (limited to 'test/test.cc')
-rw-r--r-- | test/test.cc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/test.cc b/test/test.cc index 13bad95..520286c 100644 --- a/test/test.cc +++ b/test/test.cc @@ -1,13 +1,20 @@ #include <stdio.h> #include <stdlib.h> +#include <unistd.h> + static int succeeded; static int failed; +static bool verbose; void log_test(bool predicate, const char *file, int line, const char *message) { if (predicate) { + if (verbose) + { + printf("Test passed: %s:%d: %s\n", file, line, message); + } succeeded++; return; } @@ -24,3 +31,26 @@ static void __attribute__((constructor)) init(void) { atexit(log_totals); } + +void test_type_info(void); +void test_exceptions(); +void test_guards(void); +int main(int argc, char **argv) +{ + int ch; + + while ((ch = getopt(argc, argv, "v")) != -1) + { + switch (ch) + { + case 'v': + verbose = true; + default: break; + } + } + + test_type_info(); + test_guards(); + test_exceptions(); + return 0; +} |