Skip to content

Commit

Permalink
Merge pull request #443 from byte-physics/bugfix/dimlabel-difference-…
Browse files Browse the repository at this point in the history
…case-sensitive
  • Loading branch information
t-b committed Mar 28, 2023
2 parents 9a83176 + 9ee6214 commit 78ceff4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docu/sphinx/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`
and the `original article page 36 <https://web.archive.org/web/20220329072759/http://www.mccabe.com/ppt/SoftwareQualityMetricsToIdentifyRisk.ppt>`__
- Fixed a bug where when running IUTF in an independent module, the ``run`` function was searched in ``ProcGlobal``
instead of the independent module.
- Fixed a bug where generating the detailed message for failed wave equality assertions did not ignore the case for
comparing dimension labels.

Test assertions
~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion procedures/igortest-basics.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Function GenerateDimLabelDifference(wv1, wv2, msg)

numEntries = DimSize(label1, i)
for(j = 0; j < numEntries; j += 1)
if(!cmpstr(label1[j], label2[j]))
if(!cmpstr(label1[j], label2[j], 1))
continue
endif
str1 = label1[j]
Expand Down
8 changes: 8 additions & 0 deletions tests/VTTE.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,14 @@ static Function TestIUTF()
Ensure(!IUTF_Checks#AreWavesEqual(wvDP, wvSP, WAVE_LOCK_STATE, DEFAULT_TOLERANCE, detailedMsg))
Ensure(!IUTF_Checks#AreWavesEqual(wvDP, wvSP, DATA_FULL_SCALE, DEFAULT_TOLERANCE, detailedMsg))
Ensure(!IUTF_Checks#AreWavesEqual(wvDP, wvSP, DIMENSION_SIZES, DEFAULT_TOLERANCE, detailedMsg))

Make/FREE dimLabel1, dimLabel2

SetDimLabel 0, 0, abcd, dimLabel1
SetDimLabel 0, 0, abcD, dimLabel2
Ensure(!IUTF_Checks#AreWavesEqual(dimLabel1, dimLabel2, DIMENSION_LABELS, DEFAULT_TOLERANCE, detailedMsg))
Ensure(IUTF_Checks#IsProperString(detailedMsg))
Ensure(strsearch(detailedMsg, "abcD", 0) >= 0)
// @}

// HasWaveMajorType
Expand Down

0 comments on commit 78ceff4

Please sign in to comment.