mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 21:10:08 +01:00
ifcfg-rh/tests: refactor and cleanup ifcfg-rh unit tests
"test-ifcfg-rh.c" is huge, with lots of repeated, verbose code. Refactor the code by using some helper macros so that the line noise is smaller and we can easier see what is happening. - use nmtst_connection_assert_setting() instead of nm_connection_get_setting*(), followed by an assertion. - use _nm_connection_new_setting() instead of multiple lines to create and add the setting. - drop all explicit unref/free and use cleanup macro. - unify some variable names. - drop some useless comments. In particular, comments were used as visual separators because the code is verbose and hard to read. The solution to verbose and hard to read is not more code/comments, the solution is clearer, conciser code.
This commit is contained in:
parent
f30def0e00
commit
556d76d570
1 changed files with 1091 additions and 2635 deletions
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue