Test Array1 __str__ method
(self)
| 102 | self.assertTrue(self.array1.asString() == "[ 1, 2, 3, 4, 5 ]") |
| 103 | |
| 104 | def testStr(self): |
| 105 | "Test Array1 __str__ method" |
| 106 | for i in range(self.array1.length()): |
| 107 | self.array1[i] = i - 2 |
| 108 | self.assertTrue(str(self.array1) == "[ -2, -1, 0, 1, 2 ]") |
| 109 | |
| 110 | def testView(self): |
| 111 | "Test Array1 view method" |