Pietro Gagliardi
|
6d6cd66046
|
Freed defers after they run. Apparently this is sufficient to satisfy AddressSanitizer, which... how? I'll take it, but still, there's definitely more unfreed allocations than this...
|
2019-06-02 14:06:16 -04:00 |
Pietro Gagliardi
|
4ae6ab2727
|
Changed the testing library to allow passing different filename and line numbers through to the various logging functions; cleaned up the macro hell that was by passing the action function directly to the final logging functions in testing.c. Next commit will actually implement this.
|
2019-06-01 22:03:13 -04:00 |
Pietro Gagliardi
|
bd2877154f
|
Oh, it turns out there IS a warning for shutting up -pedantic. Woo!
|
2019-06-01 20:26:43 -04:00 |
Pietro Gagliardi
|
6ffe0a4c99
|
Added functionality to mark printf() functions for compilers with warning checks, and marked such. Sadly it appears ms_printf is ignored with -pedantic, so we'll need to stop using I32...
|
2019-06-01 20:20:11 -04:00 |
Pietro Gagliardi
|
ef3352c033
|
Removed the soft librt dependency for now, since we don't appear to need it, at least for Ubuntu 14.4. If that changes (for instance, if it's required by some non-Linux system or some other distro), we can always add it back.
|
2019-06-01 12:22:35 -04:00 |
Pietro Gagliardi
|
9ad77ac57e
|
Rewrote a TODO. Didn't solve it yet, because I'm genuinely indecisive about this one.
|
2019-06-01 12:17:08 -04:00 |
Pietro Gagliardi
|
efe118a81d
|
Resolved warning suppression issue in timerDurationString(). It turns out BOTH this AND the solution were both in timer.c, and I somehow did not notice :V
|
2019-06-01 12:06:09 -04:00 |
Pietro Gagliardi
|
a8ad49fead
|
Made the names of format string arguments across the board consistent. Only the "public" functions in the testing library are kept expanded for documentation purposes.
|
2019-06-01 11:40:16 -04:00 |
Pietro Gagliardi
|
a17b7c8c14
|
Fixed build errors and simplified error handling in test/noinitwrongthread.c. Now to test this at runtime on all platforms.
|
2019-05-31 11:17:11 -04:00 |
Pietro Gagliardi
|
644e188e05
|
And rewrote strncpy(), since strncpy_s() also exists. Now to test the build.
|
2019-05-31 10:38:47 -04:00 |
Pietro Gagliardi
|
664cf26cdc
|
Changed strcpy() to strncpy(). Let's build on Windows!
|
2019-05-31 02:58:57 -04:00 |
Pietro Gagliardi
|
1814745646
|
Wrote a wrapper for vsnprintf() that calls _vcsprintf()/vsnprintf_s() on Windows, because lol. I'm going to try switching from strcpy() to strncpy() for the other cases; let's see if this works.
|
2019-05-31 02:52:51 -04:00 |
Pietro Gagliardi
|
b5a109c063
|
And wrote array_impl.h. No more code duplication in this respect! Now for some more loose ends before we move on to controls.
|
2019-05-31 00:12:08 -04:00 |
Pietro Gagliardi
|
dca2e5f038
|
Wrote array_header.h. Now for array_impl.h.
|
2019-05-30 23:47:07 -04:00 |
Pietro Gagliardi
|
0f4602ee0f
|
Moved the allocation functions to sharedbits/. Not fully working yet...
|
2019-05-30 23:11:08 -04:00 |
Pietro Gagliardi
|
c090dacc4a
|
Switched the test code to use bool wherever appropriate. Will try to do this for the rest of libui, and then I'll deduplicate the allocation and array code.
|
2019-05-30 22:09:45 -04:00 |
Pietro Gagliardi
|
b9d445554a
|
Started changing the tests to use bool instead of int.
|
2019-05-30 10:33:39 -04:00 |
Pietro Gagliardi
|
a632d10701
|
Indented diff bodies (and all other multi-line test log prints) properly.
|
2019-05-29 00:35:51 -04:00 |
Pietro Gagliardi
|
a6c1e1ed17
|
Fixed build errors. Now to fix runtime errors.
|
2019-05-27 11:02:23 -04:00 |
Pietro Gagliardi
|
07c613b2e1
|
Stripped the path from test log filenames.
|
2019-05-26 13:31:55 -04:00 |
Pietro Gagliardi
|
009a9c25aa
|
Oops (only spotted it when forcing a failure).
|
2019-05-20 22:26:11 -04:00 |
Pietro Gagliardi
|
102dff6489
|
And added testingprivOutbufString() and enabled testingTRun(). Now to rewrite the events tests to use it.
|
2019-05-20 22:03:56 -04:00 |
Pietro Gagliardi
|
57e4e0d13b
|
Removed the computedName field in testingT; we manage the memory for subtest names in testingTRun() itself.
|
2019-05-20 21:33:55 -04:00 |
Pietro Gagliardi
|
6412d8365f
|
Stored the full options struct in testingT, so options can be passed to subtests; this also avoids the need to pass them into testingprivTRun().
|
2019-05-20 21:22:02 -04:00 |
Pietro Gagliardi
|
3c9ff9c4bc
|
Added a data parameter to test scaffolds; this is currently NULL, but subtests will use it (the subtest function is called directly, not through a scaffold).
|
2019-05-20 21:10:29 -04:00 |
Pietro Gagliardi
|
bd666b8ec9
|
Started writing subtests. I'll need to make a few more structural changes to the test scaffolding for this.
|
2019-05-20 20:56:47 -04:00 |
Pietro Gagliardi
|
4112630f59
|
And fixed the remaining kinks with testingprivOutbuf. Now we can add subtests! (Forgot to mention that the previous commit also simplified the indent logic and split the actual function to run a test into its own function; this in particular also contributes to subtests.)
|
2019-05-20 20:07:59 -04:00 |
Pietro Gagliardi
|
9f0bb3aacb
|
Fixed uiprivArray/testingprivArray bugs that led to the crash. Now to fix up the rest of the code.
|
2019-05-20 11:12:16 -04:00 |
Pietro Gagliardi
|
a4c6817d33
|
Rewrote testing.c to use testingprivOutbuf. It doesn't quite work yet...
|
2019-05-20 10:57:31 -04:00 |
Pietro Gagliardi
|
9bec2005a1
|
Added smprintf() and outbuf to the testingpriv.h functions, introducing a simpler outbuf API along the way. Changing the test suite to actually use this comes next.
|
2019-05-19 23:15:35 -04:00 |
Pietro Gagliardi
|
40508a457c
|
Changed testingSet to use testingprivArray.
|
2019-05-19 18:06:58 -04:00 |
Pietro Gagliardi
|
2d8764f06b
|
Split the testing allocation and print functions into their own file, and added uiprivArray as testingprivArray. Switching everything to use testingprivArray will come next.
|
2019-05-19 17:55:31 -04:00 |
Pietro Gagliardi
|
66f1f75992
|
Started rearranging things to allow for subtests; I should clean up the allocation stuff in libui first, so they can be borrowed.
|
2019-05-19 11:05:20 -04:00 |
Pietro Gagliardi
|
07dc3ee025
|
Finished the test set implementation, moving the tester itself to use it. This also moves uiInit() into main(); in TestInit, we'll hook into uiInit() to avoid actually doing the initialization.
|
2019-05-10 21:16:29 -04:00 |
Pietro Gagliardi
|
7f986ef073
|
Started adding more flexible test set functionality.
|
2019-05-09 22:54:14 -04:00 |
Pietro Gagliardi
|
bc0d3120c8
|
Added verbosity to the test suite. Now we can move on.
|
2019-05-05 15:59:59 -04:00 |
Pietro Gagliardi
|
3ebc58a5bf
|
Fixed build issues in MinGW-w64.
|
2019-05-05 15:20:54 -04:00 |
Pietro Gagliardi
|
b7f06074fb
|
Converted testing.c to buffer test output. Also reordered test logs to be after the status line, like in Go. Now we can add verbosity control, and then maybe later even subtests!
|
2019-05-05 14:26:38 -04:00 |
Pietro Gagliardi
|
8b70e6d247
|
Cleaned up internal helper functions in testing.c, including adding one for vsnprintf() and snprintf(). This is the first step toward buffering test output and adding verbosity control.
|
2019-05-05 13:35:07 -04:00 |
Pietro Gagliardi
|
d49f8ae7e6
|
Switched the macOS code to use timerprivInt128ToUint64(). Also rearranged the arguments of timerprivInt128ToInt64() and added proper timerDurationMin/Max constants instead of the incorrect-for-that-function timerTimeMin/Max in the Windows code.
|
2019-05-05 11:16:17 -04:00 |
Pietro Gagliardi
|
ff803bf792
|
And implemented 128-bit muldiv on Windows.
|
2019-05-05 11:03:17 -04:00 |
Pietro Gagliardi
|
288c74b026
|
Implemented the new MulDiv128 stuff on macOS. To make things easier in regards to signedness, this implementation also uses a base, like the Unix one, and the mach_timebase_info() conversion is done in timerMonotonicTime() instead. (Also added the admittedly-redundant-since-the-current(ish)-implementation-cannot-fail error check to mach_timebase_info().) As a result, timerTimeSub() can now be end - start on all platforms. Also found and fixed bugs in the actual muldiv128 algorithm implementation. Next up: Windows.
|
2019-05-05 03:17:11 -04:00 |
Pietro Gagliardi
|
952b36b1c2
|
Added proper 128-bit muldiv() stuff for macOS and Windows. Will actually use them next. Also fixed compiling on non-Windows.
|
2019-05-05 02:17:11 -04:00 |
Pietro Gagliardi
|
ee3e587ddc
|
Fixed build errors on Windows.
|
2019-05-04 21:47:04 -04:00 |
Pietro Gagliardi
|
98093ed46e
|
Formatted test results across multiple lines in the same way as in Go. Also prettyprinted diffs in initmain.c.
|
2019-05-04 21:13:47 -04:00 |
Pietro Gagliardi
|
00411a4d07
|
Moved all the test infrasturcture files into a subdirectory of test/ called lib/.
|
2019-05-04 16:53:54 -04:00 |