[squeak-dev] The Inbox: ToolsTests-fbs.54.mcz

Frank Shearar frank.shearar at gmail.com
Tue Aug 14 20:03:48 UTC 2012


On 14 August 2012 20:05, Chris Muller <asqueaker at gmail.com> wrote:
> Just my 2-cents -- I was never a big fan of
> #assert:equals:description: because it puts additional String literals
> into the CM instances which... don't seem very useful -- because even
> after I read the description I still have to read and understand the
> code, which what you have here is not too complicated and, if it were,
> the work should go into simplifying it rather than explaining it..  :)

Yes re the "description:" part, partly. They're simply to disambiguate
the various asserts. The answer there is "only one assert per test",
but that's not terribly practical in this particular example, which
attempts to test a workflow.

But the value added by having a description in the CI environment...
that's worth _gold_.

It's still not good enough:

Error Message

classList after selecting Scanner class: Expected #(#String ...etc...
but was #(#Charact...etc....
Stacktrace

DependencyBrowserTest(TestCase)>>assert:description:
DependencyBrowserTest(TestCase)>>assert:equals:description:
DependencyBrowserTest>>testClassList
DependencyBrowserTest(TestCase)>>performTest

but it's a whole lot better than "assertion failed". The answer, a lot
of the time, is "don't have more than one assertion per method", but
in this case that would be a lot of extra work.

(It's still not good enough because the actual exception's message is
not truncated, and I haven't been able to find what's turning my
useful message into ...etc... Well, it's #printStringLimitedTo:,
obviously, but what's calling it?)

frank

> On Tue, Aug 14, 2012 at 5:37 AM, Frank Shearar <frank.shearar at gmail.com> wrote:
>> On 14 August 2012 11:35,  <commits at source.squeak.org> wrote:
>>> Frank Shearar uploaded a new version of ToolsTests to project The Inbox:
>>> http://source.squeak.org/inbox/ToolsTests-fbs.54.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: ToolsTests-fbs.54
>>> Author: fbs
>>> Time: 14 August 2012, 11:35:27.936 am
>>> UUID: 308456b2-b9bf-428b-a698-9041cf4c29d9
>>> Ancestors: ToolsTests-fbs.53
>>>
>>> assert:equals:description gives better error messages for failing tests.
>>>
>>> =============== Diff against ToolsTests-fbs.53 ===============
>>
>> In particular, this test fails on the build server but not locally
>> (off what's hopefully an identical image). I'm hoping the extra
>> diagnostics will tell me what's going on there. And, of course,
>> assert:equals: is better than assert:. But that goes without saying.
>>
>> frank
>>
>


More information about the Squeak-dev mailing list