Fix the analysis_global_var test when running from the build dir.

This commit is contained in:
Gleb Popov 2023-09-03 21:35:30 +03:00 committed by Riccardo Schirone
parent 606a18c4e0
commit 08091e64b2

View file

@ -3,11 +3,13 @@
#include <rz_analysis.h>
#include <rz_core.h>
#include "test_config.h"
#include "../unit/minunit.h"
bool test_rz_analysis_global_var() {
RzCore *core = rz_core_new();
RzAnalysis *analysis = core->analysis;
rz_type_db_init(analysis->typedb, TEST_BUILD_TYPES_DIR, NULL, 0, NULL);
RzAnalysisVarGlobal *glob = rz_analysis_var_global_new("foo", 0x1337);
mu_assert_notnull(glob, "create a global variable");
@ -208,6 +210,7 @@ bool test_flag_confusion_addr() {
bool test_flag_confusion_delete() {
RzCore *core = rz_core_new();
RzAnalysis *analysis = core->analysis;
rz_type_db_init(analysis->typedb, TEST_BUILD_TYPES_DIR, NULL, 0, NULL);
RzAnalysisVarGlobal *glob = rz_analysis_var_global_new("foo", 0x1337);
RzTypeParser *parser = rz_type_parser_new();