tags:

views:

48

answers:

1

I am trying to do a comparison of CString from ATL/MFC to a custom CString implementation and I want to make sure that all the functionality in the custom implementation matches that of the ATL/MFC implementation.

The reason we have a custom CString implementation is so that we can use it on *nix and Windows platforms. The interface is the same, but the implementation is different so when we port our Windows code to use the SDK we are writing we don't have to change ALL the names ... we will only have to work out the differences between the two implementations.

Any help on this would be greatly appreciated. Thanks!

+1  A: 

Personally I cannot think of any. However if I were doing it I would encode all the use cases I have for it and make sure I owned a test to cover it.

Also on windows do you delegate to the supplied implementaton or your own? If you delegated you could find your tests more useful as they could highlight differences.

Good luck,

Preet Sangha
On that note, does anyone have a list of common use cases for CString? I am not really too familiar with using it myself. Any weird ways that you might typically use CString to accomplish a common task?
Brian T Hannan
However, if someone has or knows where to get a full regression test for the CString class (ie: from Microsoft) that would be great!
Brian T Hannan
Well despite the common uses I'd say your use cases are the important ones
Preet Sangha
Thanks, that is what I did. I did a "Find In Files" type search within the entire legacy system for CString and asked around for our common use cases and made a test for each one. Thanks for the help!
Brian T Hannan