Actually you are mistaken. You can load it from a string. See loadXml for that:

http://msdn.microsoft.com/en-us/library/ms754585%28v=VS.85%29.aspx

On Thu, Jun 10, 2010 at 8:19 PM, Sean Farrell <sean.farr...@rioki.org> wrote:
> If you need a static environment, why not setup and clean up your
> stuff in your main?
>
> int main()
> {
>  SetupXmlStuff()
>  int result = UnitTest::RunAllTests();
>  CleanUpXmlStuff();
>  return result;
> }
>
> On Wed, Jun 9, 2010 at 1:51 PM, Clark Gaebel <cg.wowus...@gmail.com> wrote:
>> Your code would just be:
>> Foo(ifstream("filename"))
>> Instead of foo("filename")
>> Not really worthy of a test ;)
>> On 2010-06-09, at 1:08 AM, 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
>>
>>
>

------------------------------------------------------------------------------
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

Reply via email to