inspecting an example?

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

inspecting an example?

abergel
Hi!

Consider the method:
 RTSunburstBuilderExamples >> basic15
<gtExample>
| b mt | 
b := RTSunburstBuilder new.
^ b

By having the pragma I can run the example as a test. That is good, but I want to have the object inspected. Currently it does not.
Is there a way to get the object inspected?

With <script: ‘self new basic15 inspect’> instead of <gtExample>, then I could get it.

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: inspecting an example?

Stefan André Reichhart
Hi Alex,

> On 07 Jan 2016, at 21:11, Alexandre Bergel <[hidden email]> wrote:
>
> Hi!
>
> Consider the method:
>  RTSunburstBuilderExamples >> basic15
> <gtExample>
> | b mt |
> b := RTSunburstBuilder new.
> …
> ^ b
>
> By having the pragma I can run the example as a test. That is good, but I want to have the object inspected. Currently it does not.
> Is there a way to get the object inspected?
>
> With <script: ‘self new basic15 inspect’> instead of <gtExample>, then I could get it.
urg :(

you want to inspect "b" - right ?

"b" is the "returnValue" of the example ... so you can do
        "your example" result returnValue inspect
or shorter
        "your example" returnValue inspect

if I understand you right you would like to have a quicker and more direct access to the returnValue via the Nautilus/UI ? we can do that ... very easy. No need to stringify Smalltalk code into pragmas!

Cheers
stef

btw: the "result" of an example holds the returnValue as well as the exceptions (expected & unexpected) during runtime/testing


>
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev

signature.asc (507 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: inspecting an example?

abergel
Yes, that would be great. I am in fact just interested in getting an inspection of the resulting object.

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Jan 7, 2016, at 6:34 PM, Stefan André Reichhart <[hidden email]> wrote:

Hi Alex,

On 07 Jan 2016, at 21:11, Alexandre Bergel <[hidden email]> wrote:

Hi!

Consider the method:
RTSunburstBuilderExamples >> basic15
<gtExample>
| b mt |
b := RTSunburstBuilder new.

^ b

By having the pragma I can run the example as a test. That is good, but I want to have the object inspected. Currently it does not.
Is there a way to get the object inspected?

With <script: ‘self new basic15 inspect’> instead of <gtExample>, then I could get it.

urg :(

you want to inspect "b" - right ?

"b" is the "returnValue" of the example ... so you can do
"your example" result returnValue inspect
or shorter
"your example" returnValue inspect

if I understand you right you would like to have a quicker and more direct access to the returnValue via the Nautilus/UI ? we can do that ... very easy. No need to stringify Smalltalk code into pragmas!

Cheers
stef

btw: the "result" of an example holds the returnValue as well as the exceptions (expected & unexpected) during runtime/testing



Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev