SHTK_UNITTEST_SET_EXPECTED_FAILURE(3)
πΈ 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
- 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