Commit Graph

34 Commits

Author SHA1 Message Date
Mike Gelfand 82df3a87f4 Update to Uncrustify 0.68.1
Tweak a few rules in the process. Now all code in cli, daemon, gtk,
libtransmission, qt, and utils is properly formatted with no manual
intervention.
2019-02-15 09:21:48 +03:00
Mike Gelfand 3d0b06ca0f Add generic `check_mem` (libtest) 2017-05-30 20:09:19 +03:00
Mike Gelfand 2a7cf67913 Add generic `check_bool`, extend `check` to be more informative (libtest) 2017-05-30 19:21:14 +03:00
Mike Gelfand b1b5a577cf Transform `check_ptr_eq` into generic `check_ptr` (libtest) 2017-05-30 17:51:50 +03:00
Mike Gelfand 437904198e Transform `check_uint_eq` into generic `check_uint` (libtest) 2017-05-30 17:51:50 +03:00
Mike Gelfand 9c3c6f11e0 Transform `check_int_eq` into generic `check_int` (libtest) 2017-05-30 17:51:50 +03:00
Mike Gelfand 14c30119d4 Transform `check_str_eq` into generic `check_str` (libtest) 2017-05-30 17:51:46 +03:00
Mike Gelfand c071f824ec Pass `(u)intmax_t` instead of `(u)int64_t` to `check_(u)int_eq` (libtest) 2017-05-30 17:44:47 +03:00
Mike Gelfand 7a238e7c65 Rename `check_streq` to `check_str_eq` to be in line with other macros (libtest) 2017-05-30 17:44:42 +03:00
Mike Gelfand 4f9d9ad92b Code style change leftovers
For some reason, GTK client wasn't fully processed. All the rest of changes
are mostly in comments.
2017-04-21 10:40:57 +03:00
Mike Gelfand dadffa2c0f Align type qualifiers to the right (code style)
This way all the qualifiers (`const`, `volatile`, `mutable`) are grouped
together, e.g. `T const* const x` vs. `const T* const x`. Also helps reading
types right-to-left, e.g. "constant pointer to constant T" vs. "constant
pointer to T which is constant".
2017-04-20 19:53:20 +03:00
Mike Gelfand d7930984ef Adjust uncrustify config, reformat all but Mac client
There're places where manual intervention is still required as uncrustify
is not ideal (unfortunately), but at least one may rely on it to do the
right thing most of the time (e.g. when sending in a patch).

The style itself is quite different from what we had before but making it
uniform across all the codebase is the key. I also hope that it'll make the
code more readable (YMMV) and less sensitive to further changes.
2017-04-20 10:01:22 +03:00
Mike Gelfand 2248d3670f Get rid of $Id$ SVN keywords in source files 2016-09-02 23:10:15 +03:00
Jordan Lee 1af60ad6ad use '#pragma once' instead of #ifndef..#define..#endif guards 2016-03-29 16:37:21 +00:00
Jordan Lee 5fbd24fda5 fix a handful of minor compiler warnings, mostly in the unit tests, eg field width shortening or implicit signed/unsigned conversions 2016-03-29 03:04:54 +00:00
Mike Gelfand 52a9d774e4 Fix compilation on Windows
This should not affect non-Win32 platforms in any way.
As for Win32 (both MinGW and MSVC), this should hopefully allow for
unpatched compilation. Correct functioning is not yet guaranteed though.
2014-12-13 15:22:39 +00:00
Jordan Lee db8a589ec4 add tr_makeMetaInfo() unit test for creating a single-file torrent 2014-06-08 20:01:10 +00:00
Jordan Lee f17d152e2b separate out the sandbox code so that test sandboxes can be created without a tr_session 2014-06-08 19:09:41 +00:00
Jordan Lee 02cff80c2d Copyedit the license's revised text: (1) remove unnecessary repitition use of the word 'license' from the top of the header and source files (2) add the standard 'we hope it's useful, but no warranty' clause to COPYING (3) make explicit that linking OpenSSL is allowed (see https://people.gnome.org/~markmc/openssl-and-the-gpl.html for background) (4) sync the Qt and GTK+ clients' license popups with COPYING's revised text 2014-01-21 03:10:30 +00:00
Jordan Lee 15d11de5f4 add svn:keywords on source files that were missing them 2014-01-19 01:29:38 +00:00
Jordan Lee 4b9626bb83 Licensing changes:
1. add the option the code to be used under GPLv2 or GPLv3; previously only GPLv2 was allowed

2. add the "proxy option" as described in GPLv3 so we can add future licenses without having to bulk-edit everything again :)

3. remove the awkward "exception for MIT code in Mac client" clause; it was unnecessary and confusing.
2014-01-19 01:09:44 +00:00
Jordan Lee 1a99b9c168 change the test harness' session initialization s.t. we can configure it for per-test needs. Add tests for moving completed torrents when downloadDir is a subdirectory of incompleteDir. (Hi, KyleK) 2013-02-01 05:57:47 +00:00
Jordan Lee 69f3e31230 (libT) change the API signature for tr_torrentVerify() s.t. client code can be notified when the verify is finished 2013-01-31 21:58:25 +00:00
Jordan Lee 388da24dd0 (libT) add package-visible API hook for when a block is downloaded. Add unit test to confirm that when the last file finishes downloading, its .part suffix is removed and it's moved from the incomplete to complete dir 2013-01-26 23:08:51 +00:00
Jordan Lee 5d9335201d (libT) #4632 'custom blocklist generates 2x # of rules': add unit test (currently failing) to test for this issue. 2013-01-21 21:11:00 +00:00
Jordan Lee 5ccf3fc7e2 (libT) #5234 'typo causing RPC session-get error in nightlies': add unit test (currently failing) to test for this issue. 2013-01-21 00:00:00 +00:00
Jordan Lee ac28b6df6e (trunk) move sandboxed session creation/teardown into libtransmission-test.[ch] so that it can be reused as a fixture by future tests 2013-01-20 04:41:38 +00:00
Jordan Lee e96ed247fe refactor libtransmission's tr_benc class as tr_variant. 2012-12-14 04:34:42 +00:00
Jordan Lee 104d4aa772 don't inline functions that can't be inlined. 2012-12-13 02:00:45 +00:00
Jordan Lee bbc009bb0f in libtransmission's unit tests, add a convenience check macro for comparing pointer equality 2012-12-10 01:24:50 +00:00
Jordan Lee 3d38723ad9 Follow more common whitespace style conventions in the C code (libtransmission, daemon, utils, cli, gtk). 2012-12-05 17:29:46 +00:00
Jordan Lee 1dafe0beef more unit test cleanup 2012-10-14 23:38:52 +00:00
Jordan Lee a683ad49a8 steal some ideas about unit test error logging from Google Test 2012-10-14 17:59:24 +00:00
Jordan Lee 74c56f27b0 (trunk, libtransmission) #4934 "Create a test harness and use it for current tests" -- patch by gvdl 2012-08-18 16:07:05 +00:00