Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions procedures/igortest-basics.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -453,15 +453,12 @@ static Function EvaluateRTE(err, errmessage, abortCode, funcName, funcType, proc
IUTF_Reporting#AddError(str, IUTF_STATUS_ERROR)
break
default:
sprintf str, "Encountered \"AbortOnValue\" Code %d in %s \"%s\" (%s)", abortCode, funcTypeString, funcName, procWin
IUTF_Reporting#AddFailedSummaryInfo(str)
IUTF_Reporting#AddError(str, IUTF_STATUS_ERROR)
break
endswitch
message += str
if(abortCode > 0)
sprintf str, "Encountered \"AbortOnValue\" Code %d in %s \"%s\" (%s)", abortCode, funcTypeString, funcName, procWin
IUTF_Reporting#AddFailedSummaryInfo(str)
IUTF_Reporting#AddError(str, IUTF_STATUS_ERROR)
message += str
endif
endif

IUTF_Reporting#ReportError(message, incrGlobalErrorCounter = 0)
Expand Down
3 changes: 0 additions & 3 deletions procedures/igortest-tap.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
static StrConstant TAP_LINEEND_STR = "\n"

/// @brief returns 1 if all test cases are marked as SKIP and TAP is enabled, zero otherwise
///
/// @param testCaseList list of function names
/// @returns 1 if all test cases are marked as SKIP and TAP is enabled, zero otherwise
static Function TAP_AreAllFunctionsSkip()

variable dimPos
Expand Down
33 changes: 33 additions & 0 deletions tests/UnitTests/Utils/AbortedTests.ipf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#pragma rtGlobals=3
#pragma TextEncoding="UTF-8"
#pragma rtFunctionErrors=1
#pragma version=1.10
#pragma ModuleName=TEST_Aborted

static Function TEST_CASE_BEGIN_OVERRIDE(testcase)
string testcase

variable/G root:historyRef = CaptureHistoryStart()
End

static Function TEST_CASE_END_OVERRIDE(testcase)
string testcase

NVAR/SDFR=root: historyRef
string/G root:history = CaptureHistory(historyRef, 1)
End

// IUTF_EXPECTED_FAILURE
static Function AbortWithNegativeValue()

AbortOnValue 1, -10
End

static Function EvaluateAbortWithNegativeValue()

SVAR/SDFR=root: history

INFO("%s", s0 = history)

CHECK_GE_VAR(strsearch(history, "Encountered \"AbortOnValue\" Code -10 in test case \"TEST_Aborted#AbortWithNegativeValue\" (AbortedTestcases.ipf)", 0), 0)
End
1 change: 1 addition & 0 deletions tests/UnitTests/main.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include ":Tracing:ComplexityTests"
#include ":Utils:PathsTests"
#include ":Utils:StringsTests"
#include ":Utils:AbortedTests"

#undef UTF_ALLOW_TRACING
#if Exists("TUFXOP_Version")
Expand Down