The Trunk: Tests-fbs.285.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tests-fbs.285.mcz

commits-2
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])!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-fbs.285.mcz

Frank Shearar-3
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

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-fbs.285.mcz

Nicolas Cellier

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: ?
 
>         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




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-fbs.285.mcz

Colin Putney-3
In reply to this post by Frank Shearar-3



On Thu, Jan 9, 2014 at 8:03 AM, Frank Shearar <[hidden email]> wrote:
> 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.

Right. #bindingOf: should return nil. The test is wrong. 

But... I swear I changed that test.


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tests-fbs.285.mcz

Frank Shearar-3
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