SHTK_UNITTEST_SET_EXPECTED_FAILURE(3)

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

🌸 NAME 🌸

okay bestie, this is the SHTK_UNITTEST_SET_EXPECT(3) page from the Library Functions Manual, and we're talking about shtk_unittest_set_expect_failure β€” it makes the test expect a failure πŸ’…

πŸ“š LIBRARY πŸ“š

shtk_import unittest

✨ SYNOPSIS ✨

shtk_unittest_set_expect_failure

πŸ’– DESCRIPTION πŸ’–

The shtk_unittest_set_expect_failure function changes the behavior of the test so that a failure indicates success and a pass indicates a failure. Literally the uno reverse card of test outcomes 😭πŸ”₯

Changing the expectation of the test to a failure is useful for test cases that exercise a known bug: while the bug is live, the test case will pass with a message describing the error encountered; however, when the bug is fixed, the test will start failing indicating that it needs to be revised. it's giving "intentional red flag as a feature" 🚩✨

shtk_unittest_set_expect_failure can only be called once during the execution of a test case, and its effects cannot be reversed. no take-backs, no undo button β€” periodt 🫢

πŸ‘€ SEE ALSO πŸ‘€

πŸ¦‹ HISTORY πŸ¦‹

shtk_unittest_set_expect_failure first appeared in shtk 1.6.


xoxo, this page is from Debian, dated November 8, and filed under SHTK_UNITTEST_SET_EXPECT_FAILURE(3) πŸŽ€πŸ’œ

πŸ“¦ where this page comes from