summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-07Factor out the actual test code from conference_test.iphydf
Also, renamed simple_conference_test to conference_simple_test so it's sorted together with the other conference tests. Next step is to use run_auto_test.h for the conference test.
2018-07-06Add a test that reproduces the NULL peer nick bug.iphydf
2018-07-06lan_discovery_test and version_test cleanuphugbubby
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.
2018-07-05Use run_auto_test.h test fixture for some auto-tests.iphydf
Most of the auto-tests should use this fixture, but I've only done a few to set an example.
2018-07-05Make tox.c unambiguously parseable.iphydf
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
2018-07-04Add `#include <cstdio>` for `std::printf`.iphydf
2018-07-04Add some tests for our ring_buffer implementation.iphydf
These can serve as documentation until we write actual api docs, probably using apidsl.
2018-07-01Simplify Travis CI builds.iphydf
Have one script per build. This means more duplication between the scripts, but it's much easier to understand and to run locally.
2018-06-29Add a test to try and overflow the send queue in net_crypto.iphydf
2018-06-29Correct check for net_crypto packet index.Evgeny Kurnevsky
2018-06-29Remove broken conference tests.iphydf
These display some idea, but the tests are not implemented correctly. We will need to implement the idea correctly later, but for now we can't use these.
2018-06-28Fix leak of Logger instances in dht_test.iphydf
2018-06-28Various minor cleanups in `net_crypto`.iphydf
* Consistently use `num_packets_array` to get the packet count in the packet buffer. * Use `const` in more places. * Typo fix: begginning. * Rewrite `length < 1` for unsigned int to `length == 0`. * Limit scope of some loop variables by using for-init-decl. * Use early return in error paths to reduce indentation and for clarity. * Use `net_unpack_*` instead of manual `ntohs`. * Fix an uninitialised stack variable copy. * Fix a potential null pointer dereference. * Consistently use `get_crypto_connection`. It was inlined in some places. I de-inlined it now. * Add Loggers to some functions in preparation for adding log statements.
2018-06-28Another TCP_test.c upgradehugbubby
Mostly documentation + comments. Some cases where code was removed in exchange for more compact/less sprawly for loops. Introduced a function that removed like 30 lines of repeated code.
2018-06-27Add missing MAX_HOSTNAME_LENGTH doc.cotox
2018-06-26Make arg `host` understand clearly.cotox
Rename args `host:port` from `address:port`. The *address* is well known as *Tox Address* in this project. Then we should reserve *addres* to it, and use *host* to express the hostname or IP address in TCP domain.
2018-06-25Release v0.2.3Robin Lindén
2018-06-25Only run astyle if the astyle binary exists.iphydf
2018-06-25Remove utils.c and utils.h from toxencryptsave build.iphydf
These were deleted earlier.
2018-06-25Fixes to the imported sodium sources to compile without warnings.iphydf
2018-06-25Add a MAX_HOSTNAME_LENGTH constant.iphydf
Fixes #946.
2018-06-25Remove the format test.iphydf
It's annoying to have a test touch every source file. It causes a recompile of everything after every test run.
2018-06-25Make bootstrap daemon use toxcore's versionMaxim Biro
2018-06-24Use clang-format for C++ code.iphydf
`clang-format -style='{BasedOnStyle: Google, ColumnLimit: 100}'`
2018-06-24Add new Circle CI configuration.iphydf
This one has ASAN enabled, unlike Travis.
2018-06-24Add Logger to various net_crypto functions.iphydf
In preparation for adding log statements. Also, fix an uninitialised variable warning in cppcheck.
2018-06-24Add a test for double conference invite.iphydf
In Persistent Group Chats (PGC), this will cause a use-after-free. This test ensures that we fix this bug before merging PGC.
2018-06-23Disable UDP when proxy is enabled.iphydf
Currently, toxcore does not support UDP over proxies. In the future, we can relax this by disabling UDP only if the proxy doesn't support it.
2018-06-23Avoid conditional-uninitialised warning for tcp test.iphydf
The C compiler warns because the value is initialised in a loop and used outside of it. In this case, it's always initialised, but changing the value of `NUM_PORTS` can change that.
2018-06-23Add assertions to bootstrap tests for correct connection type.iphydf
2018-06-23Make NULL options behave the same as default options.iphydf
I.e. make tox_new(0, 0) behave the same as tox_new(tox_options_new(0), 0). Changing defaults in the options does not currently affect NULL options.
2018-06-23Add random testing program.iphydf
This can be used as a random stress test for toxcore. Adjust the weights to make certain actions more or less likely.
2018-06-23Add tests for what happens when passing an invalid proxy host.iphydf
Related: https://github.com/qTox/qTox/issues/5174
2018-06-22Clarify/Improve test_some testhugbubby
Better error messages, better sleep() call placements, etc. Did not modify large chunk of function because I couldn't explain it. Maybe I'll come back later once I've regained lost brain cells.
2018-06-22Make the net_crypto connection state an enum.iphydf
It was a list of #defines, but clearly this is a discrete and limited set of named values, so an enum is more appropriate.
2018-06-20Merge remote-tracking branch 'irungentoo/master' into merge-iruiphydf
2018-06-20Better TCP testing (beginnings)hugbubby
Tests all ports instead of just one, also adds some comments/changes error messages to be more descriptive
2018-06-19Add test for creating multiple conferences in one tox.iphydf
This triggers a code path in Persistent Group Chats that causes a memory leak. I'm adding this test now, so that we don't merge PGC without fixing the memory leak first.
2018-06-18Remove resource_leak_test.iphydf
This test has never caught a bug. It's better to catch these with asan or the likes.
2018-06-18Fix linking with address sanitizer.iphydf
`-fsanitize=address` also needs to be passed to the linker.
2018-06-17Make dht_test more stable.iphydf
By making it run in a port range far away from other tests. This test creates 100 DHTs and makes either itself or other tests run out of ports.
2018-06-17Minor cleanup: return early on error condition.iphydf
2018-06-16Only check full rtp offset if RTP_LARGE_FRAME is setRobin Lindén
2018-06-14Add minitox to under "Other resources" section in the READMElazyrobot
2018-06-09Sort bazel build file according to buildifier standard.iphydf
2018-06-08In DEBUG mode, make toxcore crash on signed integer overflow.iphydf
Signed overflow is undefined behaviour, so in debug mode, we want to make it fail in a noisy way.
2018-06-04Log only the filename, not the full path in LOGGER.iphydf
Fixes #900.
2018-06-03Fix macOS macro because of GNU Machyangfl
2018-05-29Fix enumeration of Crypto_Connection instancesPavel Karelin
2018-05-23Fix ipport_isset: port 0 is not a valid port.iphydf