Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

17
  • 1
    Nice example, that demonstrates flaws of Unit testing. If operations are tested in isolation, a bug in order of operations will go unnoticed. Commented Mar 29, 2024 at 6:08
  • 1
    @Basilevs except that isn't a flaw with Unit Tests. That's a flaw with Solitary Tests. Commented Mar 29, 2024 at 13:41
  • 1
    Even with sociable test, if you follow test pyramid and reduce the test count for expression calculation (because that is a more of an integration test), you will have the same problem, Commented Mar 29, 2024 at 14:16
  • 1
    Meanwhile, system tests for an calculator are orders of magnitude easier to write than unit tests. Commented Mar 29, 2024 at 14:20
  • 1
    @Basilevs Sure, writing crapy tests is easier. But reliable tests are easier to use. Whose time are you going to respect? Commented Mar 31, 2024 at 22:46