Skip to content

Commit efcd75f

Browse files
committed
Tests: Make STIW_TestDimensions pass again
ScaleToIndex was rectified in egde cases in latest IP8 nightly.
1 parent c3b5219 commit efcd75f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Packages/Testing-MIES/UTF_Utils.ipf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3590,7 +3590,11 @@ Function STIW_TestDimensions()
35903590

35913591
REQUIRE_EQUAL_VAR(ScaleToIndex(testWave, -1, ROWS), DimOffset(testwave, ROWS) - 1 / DimDelta(testwave, ROWS))
35923592
REQUIRE_EQUAL_VAR(ScaleToIndexWrapper(testWave, -1, ROWS), 0)
3593+
#if (NumberByKey("BUILD", IgorInfo(0)) < 36039)
35933594
REQUIRE_EQUAL_VAR(ScaleToIndex(testWave, -inf, ROWS), DimSize(testwave, ROWS) - 1)
3595+
#else
3596+
REQUIRE_EQUAL_VAR(ScaleToIndex(testWave, -inf, ROWS), NaN)
3597+
#endif
35943598
REQUIRE_EQUAL_VAR(ScaleToIndexWrapper(testWave, -inf, ROWS), 0)
35953599

35963600
REQUIRE_EQUAL_VAR(ScaleToIndex(testWave, 1e3, ROWS), DimOffset(testwave, ROWS) + 1e3 / DimDelta(testwave, ROWS))
@@ -3600,8 +3604,9 @@ Function STIW_TestDimensions()
36003604
SetScale/P x, 0, -0.1, testwave
36013605
REQUIRE_EQUAL_VAR(ScaleToIndex(testWave, -1, ROWS), DimOffset(testwave, ROWS) - 1 / DimDelta(testwave, ROWS))
36023606
REQUIRE_EQUAL_VAR(ScaleToIndexWrapper(testWave, 1, ROWS), 0)
3607+
#if (NumberByKey("BUILD", IgorInfo(0)) < 36039)
36033608
REQUIRE_EQUAL_VAR(ScaleToIndex(testWave, -inf, ROWS), ScaleToIndexWrapper(testWave, -inf, ROWS))
3604-
3609+
#endif
36053610
REQUIRE_EQUAL_VAR(ScaleToIndex(testWave, 1, ROWS), DimOffset(testwave, ROWS) + 1 / DimDelta(testwave, ROWS))
36063611
REQUIRE_EQUAL_VAR(ScaleToIndexWrapper(testWave, 1, ROWS), 0)
36073612
REQUIRE_EQUAL_VAR(ScaleToIndex(testWave, inf, ROWS), DimSize(testwave, ROWS) - 1)

0 commit comments

Comments
 (0)