Skip to content

Commit c31ccd2

Browse files
committed
fix test
1 parent a039ebc commit c31ccd2

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

src/Math-Matrix-Tests/PMMatrixTest.class.st

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ PMMatrixTest >> testMatrixAddSizeMismatch [
352352
self should: [ b transpose + a ] raise: SizeMismatch
353353
]
354354

355-
{ #category : #comparing }
355+
{ #category : 'comparing' }
356356
PMMatrixTest >> testMatrixCloseToPrecision [
357357
| a b |
358358
a := PMMatrix rows: #(#(1.2 2.4) #(1.2 2.4)).
@@ -678,6 +678,17 @@ PMMatrixTest >> testMinorsOfSquareMatrix [
678678
equals: (PMMatrix rows: { { 1 } })
679679
]
680680

681+
{ #category : 'tests' }
682+
PMMatrixTest >> testMinusEquals [
683+
684+
| matrix vector expected |
685+
matrix := PMMatrix rows: #( #( 1 2 3 ) #( 5 6 7 ) ).
686+
vector := #( 1 2 3 ) asPMVector.
687+
expected := PMMatrix rows: #( #( 0 0 0 ) #( 4 4 4 ) ).
688+
689+
self assert: matrix -= vector equals: expected
690+
]
691+
681692
{ #category : 'tests' }
682693
PMMatrixTest >> testOnesMatrix [
683694
| a |
@@ -758,8 +769,7 @@ PMMatrixTest >> testRowWiseSubstractionWith [
758769
vector := #( 1 2 3 ) asPMVector.
759770
expected := PMMatrix rows: #( #( 0 0 0 ) #( 4 4 4 ) ).
760771

761-
self assert: (matrix rowWiseSubstractionWith: vector) equals: expected.
762-
self assert: matrix -= vector equals: expected
772+
self assert: (matrix rowWiseSubstractionWith: vector) equals: expected
763773
]
764774

765775
{ #category : 'comparing' }

0 commit comments

Comments
 (0)