mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-08-01 13:36:22 +00:00
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:
@@ -1,24 +1,29 @@
|
||||
void contact_in_group(void** state);
|
||||
void contact_not_in_group(void** state);
|
||||
void contact_name_when_name_exists(void** state);
|
||||
void contact_jid_when_name_not_exists(void** state);
|
||||
void contact_string_when_name_exists(void** state);
|
||||
void contact_string_when_name_not_exists(void** state);
|
||||
void contact_string_when_default_resource(void** state);
|
||||
void contact_presence_offline(void** state);
|
||||
void contact_presence_uses_highest_priority(void** state);
|
||||
void contact_presence_chat_when_same_prioroty(void** state);
|
||||
void contact_presence_online_when_same_prioroty(void** state);
|
||||
void contact_presence_away_when_same_prioroty(void** state);
|
||||
void contact_presence_xa_when_same_prioroty(void** state);
|
||||
void contact_presence_dnd(void** state);
|
||||
void contact_subscribed_when_to(void** state);
|
||||
void contact_subscribed_when_both(void** state);
|
||||
void contact_not_subscribed_when_from(void** state);
|
||||
void contact_not_subscribed_when_no_subscription_value(void** state);
|
||||
void contact_not_available(void** state);
|
||||
void contact_not_available_when_highest_priority_away(void** state);
|
||||
void contact_not_available_when_highest_priority_xa(void** state);
|
||||
void contact_not_available_when_highest_priority_dnd(void** state);
|
||||
void contact_available_when_highest_priority_online(void** state);
|
||||
void contact_available_when_highest_priority_chat(void** state);
|
||||
#ifndef TESTS_TEST_CONTACT_H
|
||||
#define TESTS_TEST_CONTACT_H
|
||||
|
||||
void p_contact_in_group__is__true_when_in_group(void** state);
|
||||
void p_contact_in_group__is__false_when_not_in_group(void** state);
|
||||
void p_contact_name_or_jid__returns__name_when_exists(void** state);
|
||||
void p_contact_name_or_jid__returns__jid_when_name_not_exists(void** state);
|
||||
void p_contact_create_display_string__returns__name_and_resource_when_name_exists(void** state);
|
||||
void p_contact_create_display_string__returns__jid_and_resource_when_name_not_exists(void** state);
|
||||
void p_contact_create_display_string__returns__name_when_default_resource(void** state);
|
||||
void p_contact_presence__returns__offline_when_no_resources(void** state);
|
||||
void p_contact_presence__returns__highest_priority_presence(void** state);
|
||||
void p_contact_presence__returns__chat_when_same_priority(void** state);
|
||||
void p_contact_presence__returns__online_when_same_priority(void** state);
|
||||
void p_contact_presence__returns__away_when_same_priority(void** state);
|
||||
void p_contact_presence__returns__xa_when_same_priority(void** state);
|
||||
void p_contact_presence__returns__dnd(void** state);
|
||||
void p_contact_subscribed__is__true_when_to(void** state);
|
||||
void p_contact_subscribed__is__true_when_both(void** state);
|
||||
void p_contact_subscribed__is__false_when_from(void** state);
|
||||
void p_contact_subscribed__is__false_when_no_subscription_value(void** state);
|
||||
void p_contact_is_available__is__false_when_offline(void** state);
|
||||
void p_contact_is_available__is__false_when_highest_priority_away(void** state);
|
||||
void p_contact_is_available__is__false_when_highest_priority_xa(void** state);
|
||||
void p_contact_is_available__is__false_when_highest_priority_dnd(void** state);
|
||||
void p_contact_is_available__is__true_when_highest_priority_online(void** state);
|
||||
void p_contact_is_available__is__true_when_highest_priority_chat(void** state);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user