Skip to content

Commit

Permalink
restore test
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettMayson committed Oct 19, 2024
1 parent dafc3dc commit fc0ea37
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions addons/diagnostic/test_parameters.inc.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// ----------------------------------------------------------------------------

#include "script_component.hpp"

SCRIPT(test_parameters);

// ----------------------------------------------------------------------------

LOG("Testing parameters");

private ["_expected", "_result", "_this"];

// Test default params.
_this = [5];
DEFAULT_PARAM(0,_result,12);
_expected = 5;
TEST_OP(_result,==,_expected,"DEFAULT_PARAM");

_result = nil;

_this = [];
DEFAULT_PARAM(0,_result,12);
_expected = 12;
TEST_OP(_result,==,_expected,"DEFAULT_PARAM");

_result = nil;

_this = [nil];
DEFAULT_PARAM(0,_result,12);
_expected = 12;
TEST_OP(_result,==,_expected,"DEFAULT_PARAM");

_result = nil;

_this = nil;
DEFAULT_PARAM(0,_result,12);
_expected = 12;
TEST_OP(_result,==,_expected,"DEFAULT_PARAM");

nil;

0 comments on commit fc0ea37

Please sign in to comment.