Have you tried adding a static ifstream to your fixture? I think that should
do the trick...
Paulius Maruška
mailto: paulius.maru...@gmail.com
--
On Wed, Jun 9, 2010 at 08:08, Graham Reeds <graham.re...@gmail.com> wrote:
> That also would mean writing tests for whatever is reading in the ostream
> in the first place.
>
> Worth having a look at though.
>
> G.
>
>
>
> On 8 June 2010 19:30, Clark Gaebel <cg.wowus...@gmail.com> wrote:
>
>> Why not take an ostream as a parameter, instead of a filename. That way,
>> your tests can just pass in stringstreams and save your disk a whole bunch
>> of grinding.
>>
>> On Tue, Jun 8, 2010 at 11:09 AM, Graham Reeds <graham.re...@gmail.com>wrote:
>>
>>> I think this is not possible due to SUITE simply being a namespace,
>>> but can it be faked maybe by changing SUITE to a class and having nested
>>> classes?
>>>
>>> Anyway, the problem I am trying to solve is we need 100% code coverage
>>> for our unit tests (don't get me started on the practicalities and the fact
>>> that it encourages you to not check return results). One of our suites
>>> works on an xml file and simply wraps MSXML. As such it needs a physical
>>> file to work on which is created via a fixture - but the file is getting
>>> created and torn down every test (it is just a reader, not a writer)
>>>
>>> This now uses the longest amount of time off all our suites. I was going
>>> to create two temp tests that run first and last to create and delete the
>>> file but it would be nice to have actual support available for it.
>>>
>>> G.
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>>> lucky parental unit. See the prize list and enter to win:
>>> http://p.sf.net/sfu/thinkgeek-promo
>>> _______________________________________________
>>> unittest-cpp-devel mailing list
>>> unittest-cpp-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/unittest-cpp-devel
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit. See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________
>> unittest-cpp-devel mailing list
>> unittest-cpp-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/unittest-cpp-devel
>>
>>
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> unittest-cpp-devel mailing list
> unittest-cpp-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/unittest-cpp-devel
>
>
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
unittest-cpp-devel mailing list
unittest-cpp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unittest-cpp-devel