mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 04:16: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:
@@ -7,7 +7,7 @@
|
||||
#include "plugins/plugins.h"
|
||||
|
||||
void
|
||||
returns_no_commands(void** state)
|
||||
plugins_get_command_names__returns__no_commands(void** state)
|
||||
{
|
||||
plugins_init();
|
||||
GList* commands = plugins_get_command_names();
|
||||
@@ -16,7 +16,7 @@ returns_no_commands(void** state)
|
||||
}
|
||||
|
||||
void
|
||||
returns_commands(void** state)
|
||||
plugins_get_command_names__returns__commands_when_added(void** state)
|
||||
{
|
||||
plugins_init();
|
||||
PluginCommand* command1 = g_new0(PluginCommand, 1);
|
||||
|
||||
Reference in New Issue
Block a user