mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-31 01:46:21 +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,21 +1,26 @@
|
||||
void get_form_type_field_returns_null_no_fields(void** state);
|
||||
void get_form_type_field_returns_null_when_not_present(void** state);
|
||||
void get_form_type_field_returns_value_when_present(void** state);
|
||||
void get_field_type_returns_unknown_when_no_fields(void** state);
|
||||
void get_field_type_returns_correct_type(void** state);
|
||||
void set_value_adds_when_none(void** state);
|
||||
void set_value_updates_when_one(void** state);
|
||||
void add_unique_value_adds_when_none(void** state);
|
||||
void add_unique_value_does_nothing_when_exists(void** state);
|
||||
void add_unique_value_adds_when_doesnt_exist(void** state);
|
||||
void add_value_adds_when_none(void** state);
|
||||
void add_value_adds_when_some(void** state);
|
||||
void add_value_adds_when_exists(void** state);
|
||||
void remove_value_does_nothing_when_none(void** state);
|
||||
void remove_value_does_nothing_when_doesnt_exist(void** state);
|
||||
void remove_value_removes_when_one(void** state);
|
||||
void remove_value_removes_when_many(void** state);
|
||||
void remove_text_multi_value_does_nothing_when_none(void** state);
|
||||
void remove_text_multi_value_does_nothing_when_doesnt_exist(void** state);
|
||||
void remove_text_multi_value_removes_when_one(void** state);
|
||||
void remove_text_multi_value_removes_when_many(void** state);
|
||||
#ifndef TESTS_TEST_FORM_H
|
||||
#define TESTS_TEST_FORM_H
|
||||
|
||||
void form_get_form_type_field__returns__null_no_fields(void** state);
|
||||
void form_get_form_type_field__returns__null_when_not_present(void** state);
|
||||
void form_get_form_type_field__returns__value_when_present(void** state);
|
||||
void form_get_field_type__returns__unknown_when_no_fields(void** state);
|
||||
void form_get_field_type__returns__correct_type(void** state);
|
||||
void form_set_value__updates__adds_when_none(void** state);
|
||||
void form_set_value__updates__updates_when_one(void** state);
|
||||
void form_add_unique_value__updates__adds_when_none(void** state);
|
||||
void form_add_unique_value__updates__does_nothing_when_exists(void** state);
|
||||
void form_add_unique_value__updates__adds_when_doesnt_exist(void** state);
|
||||
void form_add_value__updates__adds_when_none(void** state);
|
||||
void form_add_value__updates__adds_when_some(void** state);
|
||||
void form_add_value__updates__adds_when_exists(void** state);
|
||||
void form_remove_value__updates__does_nothing_when_none(void** state);
|
||||
void form_remove_value__updates__does_nothing_when_doesnt_exist(void** state);
|
||||
void form_remove_value__updates__removes_when_one(void** state);
|
||||
void form_remove_value__updates__removes_when_many(void** state);
|
||||
void form_remove_text_multi_value__updates__does_nothing_when_none(void** state);
|
||||
void form_remove_text_multi_value__updates__does_nothing_when_doesnt_exist(void** state);
|
||||
void form_remove_text_multi_value__updates__removes_when_one(void** state);
|
||||
void form_remove_text_multi_value__updates__removes_when_many(void** state);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user