mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 18:55:10 +01:00
9c0d176d68
There were numerous small issues with test cases: - some lacked the right source file header - some were not portable at all - some were using internal libzmq APIs (headers) Solution: fixed and cleaned up.
741 B
741 B
Guidelines for tests
Write your test case as if you were writing clean application code. It should be safe to compile on all platforms.
The only include file you should use is testutil.hpp
. Do not include files from src. Do not use the internal libzmq API or your test case is fair game to be deleted.
If you must write non-portable code, wrap it in #ifdefs to ensure it will compile and run on all systems.
Note that testutil.hpp includes platform.h. Do not include it yourself as it changes location depending on the build system and OS.
All sources must contain the correct header. Please copy from test_system.cpp if you're not certain.
Please use only ANSI C99 in test cases, no C++. This is to make the code more reusable.