diff options
author | hugbubby <hugbubby@protonmail.com> | 2018-07-04 11:21:43 -0700 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-07-06 10:25:47 +0000 |
commit | 47a527509d1b9855fcc1bafe33177d7ed726faf8 (patch) | |
tree | 9872c612caefee2f532f27fe75887f3df381c81d /auto_tests/invalid_tcp_proxy_test.c | |
parent | 597f23bdd99e0962a6912231938543b42e6f43ab (diff) |
lan_discovery_test and version_test cleanup
Removed a pointless declaration of a function in lan_discovery_test
and cleaned up the one error message there. Did an entire restructuring
of the version_test using macros that resulted in fewer lines of code but more
thorough testing.
Formatting of version_test.c
back to old way, save comments and one change
Missing space
My greatest enemy
Add `#include <cstdio>` for `std::printf`.
Make tox.c unambiguously parseable.
Rules:
1. Constants are uppercase names: THE_CONSTANT.
2. SUE[1] types start with an uppercase letter and have at least one
lowercase letter in it: The_Type, THE_Type.
3. Function types end in "_cb": tox_friend_connection_cb.
4. Variable and function names are all lowercase: the_function.
This makes it easier for humans reading the code to determine what an
identifier means. I'm not convinced by the enum type name change, but I
don't know a better rule. Currently, a lot of enum types are spelled like
constants, which is confusing.
[1] struct/union/enum
Use run_auto_test.h test fixture for some auto-tests.
Most of the auto-tests should use this fixture, but I've only done a few
to set an example.
Diffstat (limited to 'auto_tests/invalid_tcp_proxy_test.c')
0 files changed, 0 insertions, 0 deletions