Skip to content

Commit

Permalink
Fix override plugin FFI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ortham committed Jun 25, 2024
1 parent 184014e commit e92d8f2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ffi/tests/ffi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ void test_esp_plugin_is_light_plugin() {
void test_esp_plugin_is_override_plugin() {
printf("testing esp_plugin_is_override_plugin()...\n");
Plugin * plugin;
auto return_code = esp_plugin_new(&plugin, ESP_GAME_FALLOUT4, "../../testing-plugins/Skyrim/Data/Blank.esl");
// The Skyrim SE light flag is the same value as the Starfield update flag.
auto return_code = esp_plugin_new(&plugin, ESP_GAME_STARFIELD, "../../testing-plugins/SkyrimSE/Data/Blank.esl");
assert(return_code == ESP_OK);

return_code = esp_plugin_parse(plugin, true);
assert(return_code == ESP_OK);

bool is_override_plugin;
Expand Down Expand Up @@ -328,10 +332,10 @@ void test_esp_plugin_is_valid_as_light_plugin() {
void test_esp_plugin_is_valid_as_override_plugin() {
printf("testing esp_plugin_is_valid_as_override_plugin()...\n");
Plugin * plugin;
auto return_code = esp_plugin_new(&plugin, ESP_GAME_SKYRIMSE, "../../testing-plugins/SkyrimSE/Data/Blank.esm");
auto return_code = esp_plugin_new(&plugin, ESP_GAME_STARFIELD, "../../testing-plugins/Starfield/Data/Blank.full.esm");
assert(return_code == ESP_OK);

return_code = esp_plugin_parse(plugin, true);
return_code = esp_plugin_parse(plugin, false);
assert(return_code == ESP_OK);

bool is_valid;
Expand All @@ -353,6 +357,7 @@ int main() {
test_esp_plugin_is_master();
test_esp_plugin_is_light_master();
test_esp_plugin_is_light_plugin();
test_esp_plugin_is_override_plugin();
test_esp_plugin_is_valid();
test_esp_plugin_description();
test_esp_plugin_header_version();
Expand Down

0 comments on commit e92d8f2

Please sign in to comment.