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:
@@ -4,7 +4,7 @@
|
||||
#include "plugins/disco.h"
|
||||
|
||||
void
|
||||
returns_empty_list_when_none(void** state)
|
||||
disco_get_features__returns__empty_list_when_none(void** state)
|
||||
{
|
||||
disco_close();
|
||||
GList* features = disco_get_features();
|
||||
@@ -16,7 +16,7 @@ returns_empty_list_when_none(void** state)
|
||||
}
|
||||
|
||||
void
|
||||
returns_added_feature(void** state)
|
||||
disco_add_feature__updates__added_feature(void** state)
|
||||
{
|
||||
disco_close();
|
||||
disco_add_feature("my_plugin", "some:feature:example");
|
||||
@@ -31,7 +31,7 @@ returns_added_feature(void** state)
|
||||
}
|
||||
|
||||
void
|
||||
resets_features_on_close(void** state)
|
||||
disco_close__updates__resets_features(void** state)
|
||||
{
|
||||
disco_close();
|
||||
disco_add_feature("my_plugin", "some:feature:example");
|
||||
@@ -49,7 +49,7 @@ resets_features_on_close(void** state)
|
||||
}
|
||||
|
||||
void
|
||||
returns_all_added_features(void** state)
|
||||
disco_get_features__returns__all_added_features(void** state)
|
||||
{
|
||||
disco_close();
|
||||
disco_add_feature("first_plugin", "first:feature");
|
||||
@@ -72,7 +72,7 @@ returns_all_added_features(void** state)
|
||||
}
|
||||
|
||||
void
|
||||
does_not_add_duplicate_feature(void** state)
|
||||
disco_add_feature__updates__not_duplicate_feature(void** state)
|
||||
{
|
||||
disco_close();
|
||||
disco_add_feature("my_plugin", "my:feature");
|
||||
@@ -86,7 +86,7 @@ does_not_add_duplicate_feature(void** state)
|
||||
}
|
||||
|
||||
void
|
||||
removes_plugin_features(void** state)
|
||||
disco_remove_features__updates__removes_plugin_features(void** state)
|
||||
{
|
||||
disco_close();
|
||||
disco_add_feature("plugin1", "plugin1:feature1");
|
||||
@@ -107,7 +107,7 @@ removes_plugin_features(void** state)
|
||||
}
|
||||
|
||||
void
|
||||
does_not_remove_feature_when_more_than_one_reference(void** state)
|
||||
disco_remove_features__updates__not_remove_when_more_than_one_reference(void** state)
|
||||
{
|
||||
disco_close();
|
||||
disco_add_feature("plugin1", "feature1");
|
||||
|
||||
Reference in New Issue
Block a user