February 21, 2005
Thomas Kühne wrote:
> Stewart Gordon wrote:
> 
>> A few more of my thoughts:
>> 
>> 1. What about issues where the spec is unclear about whether something should work or not?  Maybe the results could be called "?pass" and "?fail".  Or are these classified by some opinion on whether it should be valid?
> 
> Example?

Any test of the layout of bits within a struct.  Theoretically,
anything related to an undocumented language feature (such as the
abstract keyword, though deciding how this should work is fairly
straightforward).  No doubt others.

<snip>
> I plan to add a check for correct line numbers in the error messages. This might detect some of the botched error messages.

For that matter, should error messages with no line number at all be
considered an error result, considering that such things aren't
supposed to be part of DMD?

<snip>
> # If not, the default Error handler is run, which displays the
> # message and terminates the program.
> 
> The documentation simply states "displays" without any limitations on the howto, could be a pop-up, stderr, stdout, the keyboard leds...

And as I said, the documentation states that the program "gracefully
exits".

> A simple fix.
> 1) Open internal/dmain2.d
> 
> 2) Change from:
> #    printf("Error: ");
> #    o.print();
> 
> 3) Change to:
> #    fprintf(stderr,"Error: %.*s", o.toString());

You mean

    fprintf(stderr,"Error: %.*s\n", o.toString());

?

> You'll notice that SomeError.toString()!=SomeError.print() arg...

Indeed.  Is Object.print supposed to be pure syntactic sugar, or is
there some other hidden motive for its existence?

Stewart.

-- 
My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.
1 2
Next ›   Last »