Skip to content

Commit c8aaa3b

Browse files
committed
add testMatrixNew method
1 parent de6f562 commit c8aaa3b

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,11 @@ PMMatrixTest >> testMatrixInitializationWithNegativeDimensions [
479479
]
480480

481481
{ #category : #'linear algebra' }
482-
PMMatrixTest >> testMatrixInitialize [
483-
| a |
484-
a := PMMatrix new initializeSquare: 2.
485-
self assert: a numberOfRows equals: 2.
486-
self assert: a numberOfColumns equals: 2.
482+
PMMatrixTest >> testMatrixInitializeSquare [
483+
| aPMMatrix |
484+
aPMMatrix := PMMatrix new initializeSquare: 2.
485+
self assert: aPMMatrix numberOfRows equals: 2.
486+
self assert: aPMMatrix numberOfColumns equals: 2.
487487

488488
]
489489

@@ -538,6 +538,15 @@ PMMatrixTest >> testMatrixMultiply [
538538
self assert: ((c rowAt: 2) at: 3) equals: 4
539539
]
540540

541+
{ #category : #'linear algebra' }
542+
PMMatrixTest >> testMatrixNew [
543+
| aPMMatrix |
544+
aPMMatrix := PMMatrix new: 3.
545+
self assert: aPMMatrix numberOfRows equals: 3.
546+
self assert: aPMMatrix numberOfColumns equals: 3.
547+
548+
]
549+
541550
{ #category : #'linear algebra' }
542551
PMMatrixTest >> testMatrixPrincipalDiagonal [
543552
| a |

src/Math-Tests-Numerical/PMNumericalMethodsTestCase.class.st

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -637,11 +637,11 @@ PMNumericalMethodsTestCase >> testMatrixHash [
637637
]
638638

639639
{ #category : #'linear algebra' }
640-
PMNumericalMethodsTestCase >> testMatrixInitialize [
641-
| a |
642-
a := PMMatrix new initializeSquare: 2.
643-
self assert: a numberOfRows equals: 2.
644-
self assert: a numberOfColumns equals: 2
640+
PMNumericalMethodsTestCase >> testMatrixInitializeSquare [
641+
| aPMMatrix |
642+
aPMMatrix := PMMatrix new initializeSquare: 2.
643+
self assert: aPMMatrix numberOfRows equals: 2.
644+
self assert: aPMMatrix numberOfColumns equals: 2
645645
]
646646

647647
{ #category : #'linear algebra' }

0 commit comments

Comments
 (0)