Frank Shearar uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-fbs.285.mcz ==================== Summary ==================== Name: Tests-fbs.285 Author: fbs Time: 9 January 2014, 12:32:14.059 pm UUID: 8a2dc139-e417-ff40-8a02-1077909eff36 Ancestors: Tests-fbs.284 More "more descriptive errors" items: I missed these last time round. =============== Diff against Tests-fbs.284 =============== Item was changed: ----- Method: EnvironmentTest>>testUndeclare (in category 'binding tests') ----- testUndeclare | one two | one := env undeclare: #Griffle. two := env bindingOf: #Griffle. + self assert: two equals: one description: '#bindingOf: value doesn''t match that returned by #undeclare'. - self assert: one == two description: '#bindingOf: value doesn''t match that returned by #undeclare'. self assert: Global equals: one class description: 'Type of binding'. self assert: nil equals: one value description: 'Value of binding'.! Item was changed: ----- Method: MCPackageTest>>testUnload (in category 'tests') ----- testUnload | mock | self mockPackage unload. + self deny: (Smalltalk hasClassNamed: #MCMockClassA) description: 'Class not removed'. + self deny: (MCSnapshotTest includesSelector: #mockClassExtension) description: 'Extension method not removed'. - self deny: (Smalltalk hasClassNamed: #MCMockClassA). - self deny: (MCSnapshotTest includesSelector: #mockClassExtension). mock := (Smalltalk at: #MCMock). + self assert: (mock subclasses noneSatisfy: [:c | c name = #MCMockClassA]) description: 'Can still find the "removed" subclass'.! - self assert: (mock subclasses noneSatisfy: [:c | c name = #MCMockClassA])! |
On 9 January 2014 12:32, <[hidden email]> wrote:
> Frank Shearar uploaded a new version of Tests to project The Trunk: > http://source.squeak.org/trunk/Tests-fbs.285.mcz > > ==================== Summary ==================== > > Name: Tests-fbs.285 > Author: fbs > Time: 9 January 2014, 12:32:14.059 pm > UUID: 8a2dc139-e417-ff40-8a02-1077909eff36 > Ancestors: Tests-fbs.284 > > More "more descriptive errors" items: I missed these last time round. > > =============== Diff against Tests-fbs.284 =============== > > Item was changed: > ----- Method: EnvironmentTest>>testUndeclare (in category 'binding tests') ----- > testUndeclare > | one two | > one := env undeclare: #Griffle. > two := env bindingOf: #Griffle. > + self assert: two equals: one description: '#bindingOf: value doesn''t match that returned by #undeclare'. > - self assert: one == two description: '#bindingOf: value doesn''t match that returned by #undeclare'. > self assert: Global equals: one class description: 'Type of binding'. > self assert: nil equals: one value description: 'Value of binding'.! This test checks, among other things, that the binding of an undeclared thing is the same object as the object you got back when you undeclared it. That's not true at the moment: if you undeclare Griffle, #undeclare: returns the binding, and #bindingOf: then returns nil. We could make the test pass by removing the first assert (or better, replacing the line with " self assert: nil equals: two description: '#bindingOf:'."), but I thought it worth discussing first, before I did that. frank |
2014/1/9 Frank Shearar <[hidden email]>
asset:equals: or assert:identical: ?
|
In reply to this post by Frank Shearar-3
On Thu, Jan 9, 2014 at 8:03 AM, Frank Shearar <[hidden email]> wrote:
Right. #bindingOf: should return nil. The test is wrong. But... I swear I changed that test. |
In reply to this post by Nicolas Cellier
On 9 January 2014 13:07, Nicolas Cellier
<[hidden email]> wrote: > > 2014/1/9 Frank Shearar <[hidden email]> >> >> On 9 January 2014 12:32, <[hidden email]> wrote: >> > Frank Shearar uploaded a new version of Tests to project The Trunk: >> > http://source.squeak.org/trunk/Tests-fbs.285.mcz >> > >> > ==================== Summary ==================== >> > >> > Name: Tests-fbs.285 >> > Author: fbs >> > Time: 9 January 2014, 12:32:14.059 pm >> > UUID: 8a2dc139-e417-ff40-8a02-1077909eff36 >> > Ancestors: Tests-fbs.284 >> > >> > More "more descriptive errors" items: I missed these last time round. >> > >> > =============== Diff against Tests-fbs.284 =============== >> > >> > Item was changed: >> > ----- Method: EnvironmentTest>>testUndeclare (in category 'binding >> > tests') ----- >> > testUndeclare >> > | one two | >> > one := env undeclare: #Griffle. >> > two := env bindingOf: #Griffle. >> > + self assert: two equals: one description: '#bindingOf: value >> > doesn''t match that returned by #undeclare'. >> > - self assert: one == two description: '#bindingOf: value doesn''t >> > match that returned by #undeclare'. > > > asset:equals: or assert:identical: ? We don't have one of those... but we really should. See the Inbox. frank |
Free forum by Nabble | Edit this page |