- `RZ_PROJECT_VERSION` 14 - Add `RzCallable`.has_unspecified_parameters - Add `RzAnalysis`.debug_info - Add `RzAnalysisVarStorageType` composite and `eval` `pending` - Support for parse DWARF section "debug_loclists", "debug_ranges", "debug_rnglists" - Partial support for eval DWARF expr_loc - Support for anonymous Type, function variable, struct member - Cache all DWARF information in `RzAnalysisDebugInfo` and remove `SDB` based caching. - Add arm32, arm64, TriCore DWARF register name - Fix same name basetype
37 lines
985 B
C
37 lines
985 B
C
// SPDX-FileCopyrightText: 2020 Florian Märkl <info@florianmaerkl.de>
|
|
// SPDX-License-Identifier: LGPL-3.0-only
|
|
|
|
#ifndef TEST_SDB_H
|
|
#define TEST_SDB_H
|
|
|
|
#define PERTURBATOR "\\,\";] [}{'"
|
|
#define PERTURBATOR_JSON "\\\\,\\\";] [}{'"
|
|
|
|
static void diff_cb(const SdbDiff *diff, void *user) {
|
|
char buf[2048];
|
|
if (sdb_diff_format(buf, sizeof(buf), diff) < 0) {
|
|
return;
|
|
}
|
|
printf("%s\n", buf);
|
|
}
|
|
|
|
static inline void print_sdb(Sdb *sdb) {
|
|
Sdb *e = sdb_new0();
|
|
sdb_diff(e, sdb, diff_cb, NULL);
|
|
sdb_free(e);
|
|
}
|
|
|
|
#define assert_sdb_eq(actual, expected, msg) mu_assert((msg), sdb_diff(expected, actual, diff_cb, NULL));
|
|
|
|
#define assert_sdb_json_eq(actual, expected, msg) \
|
|
mu_assert((msg), sdb_diff_eq(expected, actual, rz_json_string_eq, diff_cb, NULL));
|
|
|
|
#define assert_streq_null(actual, expected, message) \
|
|
do { \
|
|
mu_assert(message, (!(actual)) == (!(expected))); \
|
|
if (expected) { \
|
|
mu_assert_streq(actual, expected, message); \
|
|
} \
|
|
} while (0)
|
|
|
|
#endif // TEST_SDB_H
|