MorphicToolBuilderTests

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

MorphicToolBuilderTests

Ralph Johnson
I'm trying to make all the tests green in 3.9.  Hans-Martin Mosner got
a lot cleaned up, and I'm looking at the rest.  The one that is giving
me problems at the moment is MorphicToolBuilderTests>>testAddAction.
This test is actually inherited from ToolBuilderTests.

It dies because it sends the #receiver message to a symbol.  It pulls
an "action" out of an "itemSpec" and thinks that it will be something
with a receiver, but it is just a symbol.  To me, it looks like a bug
in the test, but I don't know much about ToolBuilder.  Can somebody
who knows a little about ToolBuilder take a look and tell me how to
fix this?  Should we just delete #testAddAction from ToolBuilderTests?
 Can we fix the test?

-Ralph Johnson

Reply | Threaded
Open this post in threaded view
|

Re: MorphicToolBuilderTests

Andreas.Raab
Ralph Johnson wrote:

> I'm trying to make all the tests green in 3.9.  Hans-Martin Mosner got
> a lot cleaned up, and I'm looking at the rest.  The one that is giving
> me problems at the moment is MorphicToolBuilderTests>>testAddAction.
> This test is actually inherited from ToolBuilderTests.
>
> It dies because it sends the #receiver message to a symbol.  It pulls
> an "action" out of an "itemSpec" and thinks that it will be something
> with a receiver, but it is just a symbol.  To me, it looks like a bug
> in the test, but I don't know much about ToolBuilder.  Can somebody
> who knows a little about ToolBuilder take a look and tell me how to
> fix this?  Should we just delete #testAddAction from ToolBuilderTests?
> Can we fix the test?

The test seems broken but I'm not sure what the intent is - best ask
Colin whose initials (cwp) are on the method.

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: MorphicToolBuilderTests

Colin Putney
In reply to this post by Ralph Johnson

On Nov 24, 2006, at 7:01 AM, Ralph Johnson wrote:


> I'm trying to make all the tests green in 3.9.  Hans-Martin Mosner got
> a lot cleaned up, and I'm looking at the rest.  The one that is giving
> me problems at the moment is MorphicToolBuilderTests>>testAddAction.
> This test is actually inherited from ToolBuilderTests.
>
> It dies because it sends the #receiver message to a symbol.  It pulls
> an "action" out of an "itemSpec" and thinks that it will be something
> with a receiver, but it is just a symbol.  To me, it looks like a bug
> in the test, but I don't know much about ToolBuilder.  Can somebody
> who knows a little about ToolBuilder take a look and tell me how to
> fix this?  Should we just delete #testAddAction from ToolBuilderTests?
> Can we fix the test?
>

The test was written before PluggableMenuItemSpec was implemented -  
at the time, ToolBuilder used MenuItemMorphs, which can accept either  
a selector or a MessageSend as an action. The test verifies that  
selectors can be used as actions. Apparently when  
PluggableMenuItemsSpec was implemented, it was designed to work only  
with MessageSends.

Probably best just to delete the test.

Colin