comp.lang.ada
 help / color / mirror / Atom feed
* set_output doesnt work for ASIS Run(Reporter) for text_reporter
@ 2010-10-26  6:24 stuart clark
  2010-10-26  6:26 ` stuart clark
  2010-10-26  8:12 ` Yannick Duchêne (Hibou57)
  0 siblings, 2 replies; 6+ messages in thread
From: stuart clark @ 2010-10-26  6:24 UTC (permalink / raw)


if i use ada.text_io.set_output(my_out_file) and then call
run(reporter) the report is still output to standard out, however if i
do a ada.text_io.put_line("blah blah) then that goes to the
my_out_file.

the reporter is a aunit.reporter.text.text_reporter.

the aunit.reporter.text  traces to gnat_io.put_line(string) not
ada.text_io.

so i guess thats why set_ouput isnt working ???

anyone know how to get the reporter to write to a specific file rather
than standard out ???



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: set_output doesnt work for ASIS Run(Reporter) for text_reporter
  2010-10-26  6:24 set_output doesnt work for ASIS Run(Reporter) for text_reporter stuart clark
@ 2010-10-26  6:26 ` stuart clark
  2010-10-26  8:12 ` Yannick Duchêne (Hibou57)
  1 sibling, 0 replies; 6+ messages in thread
From: stuart clark @ 2010-10-26  6:26 UTC (permalink / raw)


On Oct 26, 4:24 pm, stuart clark <clark.stuart...@gmail.com> wrote:
> if i use ada.text_io.set_output(my_out_file) and then call
> run(reporter) the report is still output to standard out, however if i
> do a ada.text_io.put_line("blah blah) then that goes to the
> my_out_file.
>
> the reporter is a aunit.reporter.text.text_reporter.
>
> the aunit.reporter.text  traces to gnat_io.put_line(string) not
> ada.text_io.
>
> so i guess thats why set_ouput isnt working ???
>
> anyone know how to get the reporter to write to a specific file rather
> than standard out ???

why does AUnit.Reporter.Text with GNAT.IO instead of Ada.Text_IO
anyway ???



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: set_output doesnt work for ASIS Run(Reporter) for text_reporter
  2010-10-26  6:24 set_output doesnt work for ASIS Run(Reporter) for text_reporter stuart clark
  2010-10-26  6:26 ` stuart clark
@ 2010-10-26  8:12 ` Yannick Duchêne (Hibou57)
  2010-10-26  9:49   ` stuart clark
  1 sibling, 1 reply; 6+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2010-10-26  8:12 UTC (permalink / raw)


Le Tue, 26 Oct 2010 08:24:41 +0200, stuart clark  
<clark.stuart.au@gmail.com> a écrit:

> if i use ada.text_io.set_output(my_out_file) and then call
> run(reporter) the report is still output to standard out, however if i
> do a ada.text_io.put_line("blah blah) then that goes to the
> my_out_file.
>
> the reporter is a aunit.reporter.text.text_reporter.
>
> the aunit.reporter.text  traces to gnat_io.put_line(string) not
> ada.text_io.
>
> so i guess thats why set_ouput isnt working ???
>
> anyone know how to get the reporter to write to a specific file rather
> than standard out ???

Take care of your title… ASIS is deeply different thing than AUnit ;) (I  
was deeply confused by your title and the content of your message).

For your concern, I suppose you've done an unexpected assumption which is  
not stated anywhere. I just had a look at
http://libre.adacore.com/wp-content/files/auto_update/aunit-docs/aunit.html
And it just talks about standard output, and nothing there sates this is  
directed to use the same output as the one of Ada.Text_IO.

(apologize if this does not really help)

-- 
Si les chats miaulent et font autant de vocalises bizarres, c’est pas pour  
les chiens.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: set_output doesnt work for ASIS Run(Reporter) for text_reporter
  2010-10-26  8:12 ` Yannick Duchêne (Hibou57)
@ 2010-10-26  9:49   ` stuart clark
  2010-10-26 12:30     ` Georg Bauhaus
  2010-10-27 21:03     ` Simon Wright
  0 siblings, 2 replies; 6+ messages in thread
From: stuart clark @ 2010-10-26  9:49 UTC (permalink / raw)


On Oct 26, 5:12 pm, Yannick Duchêne (Hibou57)
<yannick_duch...@yahoo.fr> wrote:
> Le Tue, 26 Oct 2010 08:24:41 +0200, stuart clark  
> <clark.stuart...@gmail.com> a écrit:
>
> > if i use ada.text_io.set_output(my_out_file) and then call
> > run(reporter) the report is still output to standard out, however if i
> > do a ada.text_io.put_line("blah blah) then that goes to the
> > my_out_file.
>
> > the reporter is a aunit.reporter.text.text_reporter.
>
> > the aunit.reporter.text  traces to gnat_io.put_line(string) not
> > ada.text_io.
>
> > so i guess thats why set_ouput isnt working ???
>
> > anyone know how to get the reporter to write to a specific file rather
> > than standard out ???
>
> Take care of your title… ASIS is deeply different thing than AUnit ;) (I  
> was deeply confused by your title and the content of your message).
>
> For your concern, I suppose you've done an unexpected assumption which is  
> not stated anywhere. I just had a look athttp://libre.adacore.com/wp-content/files/auto_update/aunit-docs/auni...
> And it just talks about standard output, and nothing there sates this is  
> directed to use the same output as the one of Ada.Text_IO.
>
> (apologize if this does not really help)
>
> --
> Si les chats miaulent et font autant de vocalises bizarres, c’est pas pour  
> les chiens.

i just checked and gnat.io has a set_ouput(file).

i still dont get why aunit uses gnat.io instead of ada.text_io???



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: set_output doesnt work for ASIS Run(Reporter) for text_reporter
  2010-10-26  9:49   ` stuart clark
@ 2010-10-26 12:30     ` Georg Bauhaus
  2010-10-27 21:03     ` Simon Wright
  1 sibling, 0 replies; 6+ messages in thread
From: Georg Bauhaus @ 2010-10-26 12:30 UTC (permalink / raw)


On 26.10.10 11:49, stuart clark wrote:

> i still dont get why aunit uses gnat.io instead of ada.text_io???

If this is a recent AUnit, it might be an AdaCore product.
These can use some GNAT specifics, if only compiler specific
attributes.  GNAT.IO might or might not have technically
justifiable implications in certain environments, I'd think.

The original AUnit by Ed Falis uses Ada.Text_IO.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: set_output doesnt work for ASIS Run(Reporter) for text_reporter
  2010-10-26  9:49   ` stuart clark
  2010-10-26 12:30     ` Georg Bauhaus
@ 2010-10-27 21:03     ` Simon Wright
  1 sibling, 0 replies; 6+ messages in thread
From: Simon Wright @ 2010-10-27 21:03 UTC (permalink / raw)


stuart clark <clark.stuart.au@gmail.com> writes:

> i just checked and gnat.io has a set_ouput(file).
>
> i still dont get why aunit uses gnat.io instead of ada.text_io???

As someone else said, this gives you the chance to separate your output
from AUnit's.

On the other hand, it may be to do with problems using Ada.Text_IO in a
high-integrity environment?

You can always write your own version of AUnit.Reporter.Text if you want
(and the simplest change would of course be just to change GNAT.IO...)



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-10-27 21:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-26  6:24 set_output doesnt work for ASIS Run(Reporter) for text_reporter stuart clark
2010-10-26  6:26 ` stuart clark
2010-10-26  8:12 ` Yannick Duchêne (Hibou57)
2010-10-26  9:49   ` stuart clark
2010-10-26 12:30     ` Georg Bauhaus
2010-10-27 21:03     ` Simon Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox