SHTK_UNITTEST_ASSERT_EQUAL(3)
π 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_valuefirst,actual_valuesecond. 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
- nixos 26.05: shtk 1.7
- nixpkgs unstable: shtk 1.7
- Copyright 2014 Google Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms