6.6. Platform prejudice
We’ve come a long way since the word computer was synonymous with one specific product that everybody used. Programmers increasingly need to consider multiple alternative platforms and operating systems for their software. Though Java was once pitched at us with the tag line “write once, run anywhere,” we’ve all found ourselves implementing platform-specific functionality because not everything is abstracted away.
With our software products concerned with multiple platforms, our tests must do the same. The platform prejudice test smell could be described as a failure to treat all platforms equal. It’s more intricate than that, but perhaps an example will make it crystal clear.
The following example checks ...