[beast: 55/57] SFI: tests/misctests.cc: add --backtrace option
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 55/57] SFI: tests/misctests.cc: add --backtrace option
- Date: Sun, 23 Jul 2017 10:02:25 +0000 (UTC)
commit f6866665f56e9657f1e59aceafaf76dc00a16082
Author: Tim Janik <timj gnu org>
Date: Wed Jul 19 03:14:37 2017 +0200
SFI: tests/misctests.cc: add --backtrace option
Signed-off-by: Tim Janik <timj gnu org>
sfi/tests/misctests.cc | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/sfi/tests/misctests.cc b/sfi/tests/misctests.cc
index 0be4d76..eb44c13 100644
--- a/sfi/tests/misctests.cc
+++ b/sfi/tests/misctests.cc
@@ -775,6 +775,12 @@ test_vmarshals (void)
sfi_seq_unref (seq);
}
+static int
+my_compare_func (const void*, const void*)
+{
+ RAPICORN_BACKTRACE();
+ exit (0);
+}
static void
test_sfidl_seq (void)
@@ -859,8 +865,16 @@ int
main (int argc,
char *argv[])
{
+ if (argc >= 2 && String ("--backtrace") == argv[1])
+ {
+ char dummy_array[3] = { 1, 2, 3 };
+ qsort (dummy_array, 3, 1, my_compare_func);
+ }
+
sfi_init_test (&argc, argv);
+
test_types_init ();
+
if (0)
{
generate_vmarshal_code ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]