Unit Tests

alphacyberranger@sh.itjust.works to Programmer Humor@programming.dev – 426 points –
20

Autist ๐Ÿ™‚โ€โ†”๏ธ

Autest ๐Ÿ™‚โ€โ†•๏ธ

Z โ€“ Zero

O โ€“ One

M โ€“ Many (or More complex)

B โ€“ Boundary Behaviors

I โ€“ Interface definition

E โ€“ Exercise Exceptional behavior

S โ€“ Simple Scenarios, Simple Solutions

Use triple backticks instead of one if you are trying to get monospace syntax

the autistic overthinking the unit tests

overthinked squared

It's strangely satisfying when the "this will probably never happen" test case finds a problem during development.

I had tests for deleting that were like

  • create item a
  • create item b
  • delete item a via the code under test
  • assert item a is gone
  • assert item b is still there

I thought maybe the whole bit with item b was excessive, but sure enough one day I accidentally fucked something up and deleted all the items, and the test pointed it out before the bad code left my local machine.

Third arm: Every fucking human

Sick and tired of autism gang (tm) laying claim to totally normal human behavior just because they have a mental developmental disfigurement.

too bad, being sick and tired belongs to us now, go feel something else allist ๐Ÿ˜Ž