SHTK_UNITTEST_DELAYED_FAIL(3)
π SHTK_UNITTEST_DELAYED_FAIL π
okay bestie, so this page lives in the Library Functions Manual section (that's the SHTK_UNITTEST_DELAYED_FA(3) corner of the world, yes the header truncates it, don't come for her π
).
β¨ NAME β¨
shtk_unittest_delayed_fail β literally just records a delayed failure π«Ά
π LIBRARY π
shtk_import unittest
like, that's the import you need, no cap.
πΈ SYNOPSIS πΈ
shtk_unittest_delayed_fail [arg1 .. argN]
π¦ DESCRIPTION π¦
okay so here's the vibe: shtk_unittest_delayed_fail marks the test case that's currently running as failed, but β and this is the main character move β it lets the test keep executing. iconic. π₯
whatever message you pass in the arguments arg1 through argN gets printed right along with the failure. so your future self actually knows what went down, iykyk.
when should you use her? use shtk_unittest_delayed_fail to fail the test case when you've spotted an erroneous condition, and that condition doesn't stop the rest of the test case's code from running β and honestly might raise other (legitimate!) failure signals along the way. so you're not bailing, you're just collecting receipts. π
fr fr: it's a "keep going but note that this is broken" situation, not a "stop everything" situation.
π SEE ALSO π
π HISTORY π
shtk_unittest_delayed_fail first appeared in shtk 1.6. a legend was born β¨
and that's the whole page, bestie π this little gem came from Debian, dated November 8, 2014, and she answers to the name SHTK_UNITTEST_DELAYED_FAIL(3) β mwah ππ§ββοΈ
π¦ 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