422
Unit Tests (sh.itjust.works)
all 13 comments
sorted by: hot top controversial new old
[-] zqwzzle@lemmy.ca 21 points 7 months ago
[-] wreckedcarzz@lemmy.world 9 points 7 months ago

Hooray! 🌮

[-] Clent@lemmy.world 16 points 6 months ago

Autist 🙂‍↔️

Autest 🙂‍↕️

[-] nxdefiant@startrek.website 8 points 6 months ago

Ok, well, if you ever come across a test framework named AuTest, you can blame me, because I'm stealing the shit out of that.

[-] bitfucker@programming.dev 4 points 6 months ago
[-] lunachocken@lemm.ee 9 points 6 months ago* (last edited 6 months ago)

the autistic overthinking the unit tests

overthinked squared

[-] bitfucker@programming.dev 2 points 6 months ago

"What if the test fail?"

*Write a test for the test

[-] lunachocken@lemm.ee 1 points 6 months ago* (last edited 6 months ago)

What if the test of the test fails?

Write a test of a test!

[-] jjjalljs@ttrpg.network 8 points 6 months ago

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.

[-] iAvicenna@lemmy.world 4 points 6 months ago

what if someone tries to input a cat to this function?

[-] Mertn33@lemmy.world 1 points 6 months ago
[-] Beetschnapps@lemmy.world 1 points 6 months ago* (last edited 6 months ago)

Think of it as a function you can unleash on others…

this post was submitted on 23 May 2024
422 points (100.0% liked)

Programmer Humor

19809 readers
569 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS