summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommi Rantala <tt.rantala@gmail.com>2012-09-12 09:28:24 +0300
committerTommi Rantala <tt.rantala@gmail.com>2012-09-28 14:06:07 +0300
commitd3fd3dc3ca842a7ec2f796fc84117a71738209b5 (patch)
tree5efb7ed622c40a7103be275c9064bd3637cfe4a7
parentcc6cd621ea76e65a07d6047b8706e0f3d769f8f0 (diff)
downloadlibunwind-d3fd3dc3ca842a7ec2f796fc84117a71738209b5.tar.gz
Default to non-verbose mode in Ltest-cxx-exceptions
-rw-r--r--tests/Ltest-cxx-exceptions.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/Ltest-cxx-exceptions.cxx b/tests/Ltest-cxx-exceptions.cxx
index 827ba98a..24bcd13e 100644
--- a/tests/Ltest-cxx-exceptions.cxx
+++ b/tests/Ltest-cxx-exceptions.cxx
@@ -21,18 +21,17 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <libunwind.h>
+#include "compiler.h"
#define panic(args...) \
{ fprintf (stderr, args); exit (-1); }
+static int verbose;
+
struct Test
{
public: // --- ctor/dtor ---
@@ -55,13 +54,16 @@ extern "C" void bar()
throw 5;
} catch (...) {
Test t;
- printf("Throwing an int\n");
+ if (verbose)
+ printf("Throwing an int\n");
throw 6;
}
}
-int main()
+int main(int argc, char **argv UNUSED)
{
+ if (argc > 1)
+ verbose = 1;
try {
Test t;
bar();