File tree Expand file tree Collapse file tree 4 files changed +63
-1
lines changed
Expand file tree Collapse file tree 4 files changed +63
-1
lines changed Original file line number Diff line number Diff line change 11set (LIBRARY_NAME ariadne-utility)
22
33add_library (${LIBRARY_NAME} OBJECT
4- utility .cpp
4+ stack_trace .cpp
55)
66
77foreach (WARN ${LIBRARY_EXCLUSIVE_WARN} )
File renamed without changes.
Original file line number Diff line number Diff line change 11set (UNIT_TESTS
22 test_array
33 test_container
4+ test_stack_trace
45)
56
67foreach (TEST ${UNIT_TESTS} )
Original file line number Diff line number Diff line change 1+ /* **************************************************************************
2+ * test_stack_trace.cpp
3+ *
4+ * Copyright 2009-21 Luca Geretti
5+ *
6+ ****************************************************************************/
7+
8+ /*
9+ * This file is part of Ariadne.
10+ *
11+ * Ariadne is free software: you can redistribute it and/or modify
12+ * it under the terms of the GNU General Public License as published by
13+ * the Free Software Foundation, either version 3 of the License, or
14+ * (at your option) any later version.
15+ *
16+ * Ariadne is distributed in the hope that it will be useful,
17+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+ * GNU General Public License for more details.
20+ *
21+ * You should have received a copy of the GNU General Public License
22+ * along with Ariadne. If not, see <https://www.gnu.org/licenses/>.
23+ */
24+
25+ #include < iostream>
26+
27+ #include " config.hpp"
28+ #include " utility/stack_trace.hpp"
29+
30+ #include " ../test.hpp"
31+
32+ using namespace Ariadne ;
33+
34+ struct TestClass {
35+ Void method () {
36+ stack_trace ();
37+ }
38+ };
39+
40+ class TestStackTrace {
41+ public:
42+
43+ Void test_free_function () {
44+ stack_trace ();
45+ }
46+
47+ Void test_class_method () {
48+ TestClass ().method ();
49+ }
50+
51+ Void test () {
52+ ARIADNE_TEST_CALL (test_free_function ());
53+ ARIADNE_TEST_CALL (test_class_method ());
54+ }
55+
56+ };
57+
58+ Int main () {
59+ TestStackTrace ().test ();
60+ return ARIADNE_TEST_FAILURES;
61+ }
You can’t perform that action at this time.
0 commit comments