SHTK_UNITTEST_ADD_TEST(3)
okay bestie, welcome to shtk_unittest_add_test(3) β it lives in the Library Functions Manual and it's a tiny little helper with main-character energy π
π NAME π
shtk_unittest_add_test β Defines a standalone test case β¨
π LIBRARY π
shtk_import unittest
π¦ SYNOPSIS π¦
shtk_unittest_add_test name
π DESCRIPTION π
The shtk_unittest_add_test function registers the standalone test case given by name. That's the whole vibe.
But here's the part you cannot skip, bestie: a function named <name>_test must be defined after the call to shtk_unittest_add_test has been made. Order matters, fr fr.
no cap: define<name>_testafter you've already calledshtk_unittest_add_test. that's the rule π
π§ͺ EXAMPLES π§ͺ
The following piece of code illustrates the definition of a couple of test cases:
shtk_unittest_add_test first_scenario
first_scenario_test() {
... test code for the first test case ...
}
shtk_unittest_add_test second_scenario
second_scenario_test() {
... test code for the second test case ...
}
π SEE ALSO π
πΈ HISTORY πΈ
shtk_unittest_add_test first appeared in shtk 1.6.
and that's the cute little sign-off: this page is the Debian one, dated November 8, 2014, and it's literally SHTK_UNITTEST_ADD_TEST(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