Skip to content

Commit 45f237e

Browse files
committed
UnitTestSuite: fix error messages in several assertions
1 parent eeb9695 commit 45f237e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

modules/DependencyControl/UnitTestSuite.moon

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ class UnitTest
517517
}
518518

519519
@assert self.itemsEqual(actual, expected, onlyNumKeys),
520-
msgs.assert[onlyNumKeys and "itemsEqualNumericKeys" or "itemsEqualAllKeys"],
520+
@@msgs.assert[onlyNumKeys and "itemsEqualNumericKeys" or "itemsEqualAllKeys"],
521521
@logger\dumpToString(actual), @logger\dumpToString expected
522522

523523

@@ -533,7 +533,7 @@ class UnitTest
533533
}
534534

535535
@assert self.itemsEqual(actual, expected, onlyNumKeys, nil, true),
536-
msgs.assert[onlyNumKeys and "itemsEqualNumericKeys" or "itemsEqualAllKeys"],
536+
@@msgs.assert[onlyNumKeys and "itemsEqualNumericKeys" or "itemsEqualAllKeys"],
537537
@logger\dumpToString(actual), @logger\dumpToString expected
538538

539539
--- Fails the assertion if the numerically-keyed items of a table aren't continuous.
@@ -549,7 +549,7 @@ class UnitTest
549549
if type(v) == "number" and math.floor(v) == v
550550
realCnt += 1
551551

552-
@assert realCnt == contCnt, msgs.assert.continuous, contCnt+1, realCnt
552+
@assert realCnt == contCnt, @@msgs.assert.continuous, contCnt+1, realCnt
553553

554554
-- string asserts
555555

@@ -597,7 +597,7 @@ class UnitTest
597597
res = table.pack pcall func, ...
598598
retCnt, success = res.n, table.remove res, 1
599599
res.n = nil
600-
@assert success == false, msgs.assert.error, retCnt, @logger\dumpToString res
600+
@assert success == false, @@msgs.assert.error, retCnt, @logger\dumpToString res
601601
return res[1]
602602

603603
--- Fails the assertion if a function call doesn't cause an error message that matches the specified pattern.

0 commit comments

Comments
 (0)