byte-physics / igortest

Igor Pro Universal Testing Framework
https://docs.byte-physics.de/igor-unit-testing-framework/
BSD 3-Clause "New" or "Revised" License
7 stars 2 forks source link

Code creates leaks but it is really not #340

Closed t-b closed 1 year ago

t-b commented 1 year ago
Function CreateRealLeakQuestionMark()

    Make/FREE wv
    Make/WAVE/N=1 container = wv
    PASS()
End
runtest("UTF_SweepFormula.ipf", testcase = "CreateRealLeakQuestionMark", waveTrackingMode = UTF_WAVE_TRACKING_ALL)

gives

  Start of test "Unnamed"
  Entering test suite "UTF_SweepFormula.ipf"
  Entering test case "CreateRealLeakQuestionMark"
  Free wave leak detected (leaked waves: 1) in "CreateRealLeakQuestionMark"
  Leaving test case "CreateRealLeakQuestionMark"
  Failed with 1 errors
  Leaving test suite "UTF_SweepFormula.ipf"
  Test finished with 1 errors
    ▶ Free wave leak detected (leaked waves: 1) in "CreateRealLeakQuestionMark"
  End of test "Unnamed"

and trick question: Is that wave leak for real? I'd say no, probably the current datafolder (CDF) is deleted after the wave leak check.