Files
cproof/tests/unittests/xmpp/test_form.h
Michael Vetter e81435be06 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.
2026-02-28 12:41:33 +01:00

27 lines
1.5 KiB
C

#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