2019-11-13 Martin Liska <mliska@suse.cz>
* dbgcnt.c (test_sorted_dbg_counters): New.
(dbgcnt_c_tests): Likewise.
* selftest-run-tests.c (selftest::run_tests): Likewise.
* selftest.h (dbgcnt_c_tests): Likewise.
From-SVN: r278144
+2019-11-13 Martin Liska <mliska@suse.cz>
+
+ * dbgcnt.c (test_sorted_dbg_counters): New.
+ (dbgcnt_c_tests): Likewise.
+ * selftest-run-tests.c (selftest::run_tests): Likewise.
+ * selftest.h (dbgcnt_c_tests): Likewise.
+
2019-11-13 Jan Hubicka <hubicka@ucw.cz>
Martin Jambor <mjambor@suse.cz>
#include "coretypes.h"
#include "diagnostic-core.h"
#include "dumpfile.h"
+#include "selftest.h"
#include "dbgcnt.h"
}
printf ("\n");
}
+
+#if CHECKING_P
+
+namespace selftest {
+
+/* Selftests. */
+
+static void
+test_sorted_dbg_counters ()
+{
+ for (unsigned i = 0; i < debug_counter_number_of_counters - 1; i++)
+ ASSERT_LT (strcmp (map[i].name, map[i + 1].name), 0);
+}
+
+void
+dbgcnt_c_tests ()
+{
+ test_sorted_dbg_counters ();
+}
+
+} // namespace selftest
+
+#endif /* #if CHECKING_P */
store_merging_c_tests ();
predict_c_tests ();
simplify_rtx_c_tests ();
+ dbgcnt_c_tests ();
/* Run any lang-specific selftests. */
lang_hooks.run_lang_selftests ();
extern void vec_perm_indices_c_tests ();
extern void wide_int_cc_tests ();
extern void opt_proposer_c_tests ();
+extern void dbgcnt_c_tests ();
extern int num_passes;