views:

33

answers:

2

We have an application that now has a 64 bit target, as well as the old 32 bit target. My question concerns our Unit Tests. Should we compile and run our Unit Tests in both as well? Is there any chance we will find flaws this way? Am I being overly paranoid?

+2  A: 
  1. If the language exposes the differences between 32- and 64-bit mode, of course you should unit-test both. It will take less than twice the human resources than for testing only one platform, so it's a bargain :).

  2. If your language doesn't expose the difference between 32- and 64-bit (say, you have only unbounded integers in that language), you should still unit-test both platforms. You will find bugs in the platform-dependent implementation of your platform-independent language, or make sure that there aren't any that affect your code too obviously. And in this case the additional human cost of the second set of tests is nil, the oracles are the same as for the first one.

EDIT: thinking about case 1 again, perhaps you should write your code so that it gives the same results on both platforms even if your language exposes the differences between 32- and 64-bit. In this case again, the oracles are the same for both series of tests.

Pascal Cuoq
+1  A: 

I believe they both must be run for each nightly build. For daily integration builds though it's enough to run only one set of tests.

Rorick