June 05, 2011
I would like to suggest a method for defining code statement
covering. Some examp1es of a cover are as follows :-
  - try ... finally - this is defined in dotnet as a using
  - try ... (catch)+
  - cursor save and display others ... restore saved cursor

a possible syntax

  cover Hourglass(Application &app)
  {
    Cursor save = app.cursor;
    app.cursor = HOURGLASS_CURSOR;
    ~ code ~
    app.cursor = save;
  }

usage could be something like

  mixin(Hourglass(application))
  {
    ...
  }

June 05, 2011
On 05/06/2011 13:03, Vincent Risi wrote:
> I would like to suggest a method for defining code statement
> covering. Some examp1es of a cover are as follows :-
>    - try ... finally - this is defined in dotnet as a using
>    - try ... (catch)+
>    - cursor save and display others ... restore saved cursor
>
> a possible syntax
>
>    cover Hourglass(Application&app)
>    {
>      Cursor save = app.cursor;
>      app.cursor = HOURGLASS_CURSOR;
>      ~ code ~
>      app.cursor = save;
>    }
>
> usage could be something like
>
>    mixin(Hourglass(application))
>    {
>      ...
>    }
>

You should re-post this on digitalmars.D.learn - this newsgroup is unused.

-- 
Robert
http://octarineparrot.com/