Commit Graph

4311 Commits

Author SHA1 Message Date
Pietro Gagliardi 7486ff6b25 Changed the programmer error tests to require a strict match. Now I want to restructure them to both be reusable and to not require global state. 2019-06-09 13:44:46 -04:00
Pietro Gagliardi a2b9145931 Did the same rewording to most of the other programmer errors. Only the first two are left, because I can't think of a good rewording... 2019-06-09 13:39:14 -04:00
Pietro Gagliardi 87a2195027 Renamed the uiControl programmer errors to more clearly indicate they are uiControl programmer errors, and reworded their messages to put the function name first. 2019-06-09 13:32:31 -04:00
Pietro Gagliardi 0f41bb2188 Made all programmer error functions take the function name as an argument. 2019-06-09 13:18:18 -04:00
Pietro Gagliardi 9b11ec4a6f Changed the IntID error into a uiEvent-specific one. 2019-06-09 10:30:47 -04:00
Pietro Gagliardi 14c80eefb8 Started organizing common/programmererrors.h. 2019-06-09 10:27:28 -04:00
Pietro Gagliardi e808d85e01 Added function names to the wrong struct size error. 2019-06-09 08:50:12 -04:00
Pietro Gagliardi 9e05efa091 Oh right forgot to clean up error stuff from zOLD. 2019-06-09 08:44:30 -04:00
Pietro Gagliardi e3a4d34196 Started cleaning up zOLD/control stuff now that we are reimplmenting it all. 2019-06-09 08:39:51 -04:00
Pietro Gagliardi c45ab57bce Started writing control tests. This is going to be fun... 2019-06-08 21:38:32 -04:00
Pietro Gagliardi 822572d395 Stubbed out the OS-specific files on macOS so I can actually start writing the uiControl tests. 2019-06-08 19:45:09 -04:00
Pietro Gagliardi 379fc230e5 More compile fixes. sharedbits is starting to get really messy. 2019-06-08 18:39:59 -04:00
Pietro Gagliardi 22cc5ad834 More error fixing. 2019-06-08 18:22:16 -04:00
Pietro Gagliardi 19fc6f674f Oops, forgot to add controls.c to the build. 2019-06-08 18:09:37 -04:00
Pietro Gagliardi 9f776c140d Fixed compile errors. 2019-06-08 18:09:12 -04:00
Pietro Gagliardi 7aa1b0870d And finished filling in controls.c. This is gonna be fun to debug... 2019-06-08 15:31:40 -04:00
Pietro Gagliardi 1189877ca5 Started writing the uiControl implementation. 2019-06-08 13:00:30 -04:00
Pietro Gagliardi e2842bae35 Oops, forgot to put Size in uiControlVtable. Let's go! 2019-06-08 09:58:25 -04:00
Pietro Gagliardi 6f4c65defc Finished the uiEventInvalidateSender() tests. 2019-06-07 21:05:45 -04:00
Pietro Gagliardi 5260d5c90f More reminders for when I write the rest of the uiEventInvalidateSender() tests later. 2019-06-07 11:01:17 -04:00
Pietro Gagliardi 6cf92b2058 Wrote and started testing uiEventInvalidateSender(). The rest of the tests come next. 2019-06-07 10:58:39 -04:00
Pietro Gagliardi 65c88fd1c4 And documented all the other functions we need to start writing common/control.c. 2019-06-06 22:51:37 -04:00
Pietro Gagliardi 582a781171 More uiControl work. 2019-06-05 23:20:53 -04:00
Pietro Gagliardi 4ff61c81b0 More uiControl documentation writing. This new system might work nicely the way I'm designing it... 2019-06-04 20:33:29 -04:00
Pietro Gagliardi 26e492539d Renamed uiFreeEvent() to uiEventFree() for consistency with uiControlFree(). 2019-06-02 22:04:25 -04:00
Pietro Gagliardi 57dc482f2a Oops 2019-06-02 20:50:55 -04:00
Pietro Gagliardi b8f8e1c4f7 Started writing out uiControl's documentation. This new design is going to be rather interesting. 2019-06-02 20:47:27 -04:00
Pietro Gagliardi c6294f163f Okay, added uiFreeEvent() error tests. Now back to uiControl. 2019-06-02 19:11:22 -04:00
Pietro Gagliardi d040bca07e Started layout out the uiControl stuff. I forgot to write tests for uiFreeEvent() errors :| 2019-06-02 18:49:16 -04:00
Pietro Gagliardi 12c01d0d42 Ensured calls to bsearch() have a length of at least 1; UndefinedBehaviorSanitizer will warn otherwise. Also included qsort(), to be safe. 2019-06-02 14:26:25 -04:00
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 ddaa10b7e1 Wrote defers into test/events.c. Woo! Now we need to free the defers when we're done, and I have an idea... 2019-06-02 12:48:06 -04:00
Pietro Gagliardi 9f2796ebac Added uiEventFree(). Now to add it to the tests and see what AddressSanitizer says afterward. 2019-06-02 10:06:50 -04:00
Pietro Gagliardi ece22bdddc Split programmer errors into their own header file for readability and turned the names from string constants into full-fledged uiprivProgrammerError() calls to increase safety. 2019-06-02 08:35:40 -04:00
Pietro Gagliardi 623575f25a Changed uiprivProgrammerError() to use format strings directly, so errors can be more easily caught. We'll make things even more robust when I change the programmer error macros to be functions. 2019-06-02 02:23:12 -04:00
Pietro Gagliardi 671c2031bf TODO in allcalls.h now resolved. 2019-06-02 02:07:33 -04:00
Pietro Gagliardi b5e8b76066 Fixed one mistake. 2019-06-02 02:04:20 -04:00
Pietro Gagliardi 3f4765d116 Renamed diffx() to diff(). 2019-06-02 01:59:08 -04:00
Pietro Gagliardi 0c673acf70 Got rid of all the diff() macros; the replacement, currently called diffx(), just produces the requisite format string. Next up is renaming diffx() to diff() and making sure things work. 2019-06-02 01:51:40 -04:00
Pietro Gagliardi 5d1e6a0cf2 Began handling all the other cases. diff() and diff_2str() go away next. 2019-06-02 01:36:53 -04:00
Pietro Gagliardi 1cf545d369 Started mapping filenames and line numbers back to their appropriate places in the tester. 2019-06-02 01:13:56 -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 8980a8663b Cleaned up a TODO. 2019-06-01 20:46:41 -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 8531710f03 More TODOs. 2019-06-01 12:11:16 -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