SHTK_UNITTEST_ASSERT_EQUAL(3)

πŸ“¦ version 1.7, in nixos 26.05, nixpkgs unstable

πŸ’– SHTK_UNITTEST_ASSERT_EQUAL(3) πŸ’–

okay so you're in the Library Functions Manual, section 3, and this is the page for shtk_unittest_assert_equal β€” the little equality-check bestie you didn't know you needed. it lives in the <pink>shtk</pink> family (iykyk) and it's literally here to tell you whether two things match. slay.


✨ NAME ✨

shtk_unittest_assert_equal β€” a fatal equality check between two values πŸ’…

like, not a casual "hmm maybe" check. a fatal one. if it fails, we're done here, no cap.


πŸŽ€ LIBRARY πŸŽ€

You gotta import it first, obviously:

shtk_import unittest

that's it. that's the whole library line. go off. 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

shtk_unittest_assert_equal expected_value actual_value

two arguments, one job: compare. iconic behavior tbh.


🌸 DESCRIPTION 🌸

so the shtk_unittest_assert_equal function implements an equality check between two values. periodt.

if actual_value matches the expected value given in expected_value (which is usually hardcoded right there in your test β€” main character energy), then the check is considered a success. yay! πŸŽ‰βœ¨

otherwise? the check fails and the test case is aborted. yeah. like, full stop, test over, vibe check failed, πŸ’€. no gentle "sorry bestie, mismatch" β€” it just ends the whole test case right there. dramatic? maybe. effective? absolutely. πŸ™ˆ

so like, make sure your expected value is actually correct before you go asserting things, okay? πŸ’œ


🌈 SEE ALSO 🌈

go read those too, they're the supporting cast and they ate. πŸ‘‘


⭐ HISTORY ⭐

shtk_unittest_assert_equal first appeared in shtk 1.6. a legend was born, fr fr. 🧚


reminder bestie: expected_value first, actual_value second. yes, it matters. no, you will not remember. yes, you will debug it for 20 minutes. we've all been there. πŸ“

and that's the whole page, babe πŸŽ€πŸ’– this cutie dropped on November 8, 2014 from Debian, and it's handing out SHTK_UNITTEST_ASSERT_EQUAL(3) realness to this very day. mwah. πŸ’‹ slay

πŸ“¦ where this page comes from