tests: standardize naming convention

Use a behavior-driven naming convention for unit tests.

Functions are now named using the pattern: [unit]__[verb]__[scenario]
The __ works as a semantic separator.

Examples:
* jid_create__returns__null_from_null()
* cmd_connect__shows__usage_when_no_server_value

Benefits:
* Easy to find all tests associated with a specific function using the
  mandatory prefix.
* Test output in CI now explicitly describes the unit, the expected
  outcome, and the scenario being tested.

Also disabled keyhandlers tests due to missing code in src/ui.
This commit is contained in:
Michael Vetter
2026-02-28 12:41:33 +01:00
parent a7408a970e
commit e81435be06
53 changed files with 1601 additions and 1433 deletions

View File

@@ -1,7 +1,12 @@
void returns_empty_list_when_none(void** state);
void returns_added_feature(void** state);
void resets_features_on_close(void** state);
void returns_all_added_features(void** state);
void does_not_add_duplicate_feature(void** state);
void removes_plugin_features(void** state);
void does_not_remove_feature_when_more_than_one_reference(void** state);
#ifndef TESTS_TEST_PLUGINS_DISCO_H
#define TESTS_TEST_PLUGINS_DISCO_H
void disco_get_features__returns__empty_list_when_none(void** state);
void disco_add_feature__updates__added_feature(void** state);
void disco_close__updates__resets_features(void** state);
void disco_get_features__returns__all_added_features(void** state);
void disco_add_feature__updates__not_duplicate_feature(void** state);
void disco_remove_features__updates__removes_plugin_features(void** state);
void disco_remove_features__updates__not_remove_when_more_than_one_reference(void** state);
#endif