>| -----Original Message----- >| From: Ben Maurer [mailto:[EMAIL PROTECTED] >| Sent: Tuesday, February 17, 2004 3:23 AM >| To: Charlie Poole >| Cc: 'Jaroslaw Kowalski'; 'Nick Drochak'; Mono Development; '! nant' >| Subject: RE: [Mono-devel-list] Detecting Mono >| >| I really, really dont think this is the way to go. >| >| Software should not work like this: >| "if you are running on windows, pressing `foo' will result in blah. As >| an exception, on windows 98, nothing will happen. On linux, it will do >| bar if it is running on RedHat 9 or Fedora, but will do baz if it is >| running on any other linux system." >| >| You might have a feature that is implemented in different ways on >| different systems -- for example, maybe on Windows you store a key in >| the registry, but on Linux you store it in a dot file.
This depends on what exactly you are testing and what other concerns you are addressing. At a certain level of granularity it does matter. A unit test to make sure the dot file got the value is different from the unit test to make sure the registry got updated. Unit tests can and should test different levels of abstraction. >| Having different tests for different platforms implies that you intend >| for the program to work differently in each platform. This isnt really >| consistant with having a program that is really cross platform. We already have this with .NET 1.1 vs. .NET 1.0. As bugs get fixed, for example, we have different results in different versions of .NET. I think the Platform attribute is a nice, consistent extension that handles this nicely. I can think of a few other issues this allows us to handle: - Places we choose not to have bug-for-bug compatibility with .NET - File related mis-matches due to differences in the OS's, e.g. permissions. - Stuff I don't even know about yet that will come from the PPC version of mono running on a Mac I agree this is a tool that needs to be used correctly and carefully--more like a surgeon with a scalpel than a lumberjack with a magic chainsaw :) We just need to keep our eyes open and watch the patches coming in on tests. Regards, Nick D. ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
