-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2192 from AllenInstitute/feature/2192-spring_clea…
…nup_tests Refactor Utils/SweepFormula test code
- Loading branch information
Showing
31 changed files
with
12,231 additions
and
11,563 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#pragma TextEncoding="UTF-8" | ||
#pragma rtGlobals=3 // Use modern global access method and strict wave access. | ||
#pragma rtFunctionErrors=1 | ||
#pragma ModuleName=TESTS_DEBUGGING | ||
|
||
/// BUG | ||
/// BUG_TS | ||
/// @{ | ||
|
||
Function BUGWorks() | ||
variable bugCount | ||
|
||
bugCount = ROVar(GetBugCount()) | ||
CHECK_EQUAL_VAR(bugCount, 0) | ||
|
||
BUG("abcd") | ||
|
||
bugCount = ROVar(GetBugCount()) | ||
CHECK_EQUAL_VAR(bugCount, 1) | ||
|
||
DisableBugChecks() | ||
End | ||
|
||
Function BUG_TSWorks1() | ||
variable bugCount | ||
|
||
TUFXOP_Clear/N=(TSDS_BUGCOUNT)/Q/Z | ||
|
||
bugCount = TSDS_ReadVar(TSDS_BUGCOUNT) | ||
CHECK_EQUAL_VAR(bugCount, NaN) | ||
|
||
BUG_TS("abcd") | ||
|
||
bugCount = TSDS_ReadVar(TSDS_BUGCOUNT) | ||
CHECK_EQUAL_VAR(bugCount, 1) | ||
|
||
DisableBugChecks() | ||
End | ||
|
||
threadsafe static Function BugHelper(variable idx) | ||
|
||
BUG_TS(num2str(idx)) | ||
|
||
return TSDS_ReadVar(TSDS_BUGCOUNT) == 0 | ||
End | ||
|
||
Function BUG_TSWorks2() | ||
variable bugCount, numThreads | ||
|
||
TUFXOP_Clear/N=(TSDS_BUGCOUNT)/Q/Z | ||
|
||
bugCount = TSDS_ReadVar(TSDS_BUGCOUNT) | ||
CHECK_EQUAL_VAR(bugCount, NaN) | ||
|
||
numThreads = 10 | ||
|
||
Make/FREE/N=(numThreads) junk = NaN | ||
|
||
MultiThread/NT=(numThreads) junk = BugHelper(p) | ||
|
||
CHECK_EQUAL_VAR(Sum(junk), 0) | ||
|
||
bugCount = TSDS_ReadVar(TSDS_BUGCOUNT) | ||
CHECK_EQUAL_VAR(bugCount, numThreads) | ||
|
||
DisableBugChecks() | ||
End | ||
|
||
/// @} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.