Pietro Gagliardi
|
29ce809772
|
And FINALLY fixed the NULL name error in uiRegisterControlType().
|
2019-06-15 21:38:21 -04:00 |
Pietro Gagliardi
|
0550e4bc00
|
Turned testVtable into a function that returned the pointer to use, made the OSVtable equivalent likewise, and renamed darwin/control.m to darwin/controls.m.
|
2019-06-15 21:33:53 -04:00 |
Pietro Gagliardi
|
b6a8d24c3e
|
And fixed const issues and other build errors.
|
2019-06-15 20:48:20 -04:00 |
Pietro Gagliardi
|
ad209175c1
|
Migrated controls_errors.h. Now I need to add consts to uiRegisterControlType() and friends.
|
2019-06-15 20:38:18 -04:00 |
Pietro Gagliardi
|
4d78b5a3ef
|
Migrated noinitwrongthread.c.
|
2019-06-15 20:17:45 -04:00 |
Pietro Gagliardi
|
8c7f1987da
|
And fixed build errors. It works! Now to translate everything else back.
|
2019-06-15 20:06:12 -04:00 |
Pietro Gagliardi
|
83dc1d6065
|
And removed errors.h.
|
2019-06-15 19:59:17 -04:00 |
Pietro Gagliardi
|
c2bace108d
|
And finished rewriting events_errors.h.
|
2019-06-15 19:58:46 -04:00 |
Pietro Gagliardi
|
f966b6ee16
|
Adapted everything to life with C++ and to the new error checking model.
|
2019-06-15 19:53:50 -04:00 |
Pietro Gagliardi
|
c74fc09261
|
Started rewriting the error checks in C++, because ugh.
|
2019-06-15 19:28:47 -04:00 |
Pietro Gagliardi
|
5d63b34904
|
I should probably just switch all this to C++ at this rate.
|
2019-06-14 20:15:39 -04:00 |
Pietro Gagliardi
|
f517742a3c
|
Started rewriting events_errors.c to use a new errors.h that will do all the hard work. We'll need to do slightly more work for this particular case because of the firing stuff, though.
|
2019-06-13 21:20:39 -04:00 |
Pietro Gagliardi
|
ae4bfea10b
|
Started rewriting events_errors.c to mention events less; this will turn into an events.h that will do all the heavy lifting.
|
2019-06-13 20:57:15 -04:00 |
Pietro Gagliardi
|
ab82278a30
|
And got things building. Now to clean up the error macro part.
|
2019-06-13 10:43:44 -04:00 |
Pietro Gagliardi
|
d54f23c0cc
|
Deduplicated the common defer functions.
|
2019-06-13 10:39:40 -04:00 |
Pietro Gagliardi
|
f3b0dc16ab
|
Slight refactoring of the controls test. One more thing to do for now.
|
2019-06-13 10:31:17 -04:00 |
Pietro Gagliardi
|
c1ca78c46e
|
Split the events.c errors test into its own file.
|
2019-06-12 11:12:08 -04:00 |
Pietro Gagliardi
|
47a8ccaf98
|
And filled in the error messages in controls_errors.h.
|
2019-06-12 11:03:21 -04:00 |
Pietro Gagliardi
|
63773f703c
|
Fixed build errors. The test itself will fail at present, but we have some cleanups to do still...
|
2019-06-11 21:29:25 -04:00 |
Pietro Gagliardi
|
e30ed33046
|
Finished rewriting test/controls.c for the initial run. Now to fix errors.
|
2019-06-11 21:23:56 -04:00 |
Pietro Gagliardi
|
28a5cd543a
|
Started writing the uiControl error tests.
|
2019-06-11 12:01:35 -04:00 |
Pietro Gagliardi
|
6903bebe7d
|
Started writing the controls Darwin-specific code and all-platforms tests for real.
|
2019-06-10 23:09:48 -04:00 |
Pietro Gagliardi
|
7e3d6d2b1c
|
And fixed build and runtime errors. This works! Woo! We can now move on to uiControl for real this time! (Will resolve the TODOs later.)
|
2019-06-10 11:36:44 -04:00 |
Pietro Gagliardi
|
a0fc3187e2
|
And rewrote events.c to use the new error checking framework. Now to fix build and possibly runtime errors.
|
2019-06-10 11:24:33 -04:00 |
Pietro Gagliardi
|
7b10fa729b
|
More TODOs.
|
2019-06-10 10:42:11 -04:00 |
Pietro Gagliardi
|
70ff47cb06
|
Wrote a new file to store the uiEvent error test cases.
|
2019-06-10 10:41:33 -04:00 |
Pietro Gagliardi
|
afbf5f2d59
|
And actually did split the new error testing code into its own file. Next is changing both events.c and controls.c to use it (and yes, that means we can finally start continuing work on controls.c).
|
2019-06-09 22:45:44 -04:00 |
Pietro Gagliardi
|
b34a427077
|
Further refactored noinitwrongthread.c; at this point, the actual check runner can be separated into its own file and used elsewhere.
|
2019-06-09 22:33:45 -04:00 |
Pietro Gagliardi
|
05b1e26ee2
|
Removed some leftover code.
|
2019-06-09 21:18:31 -04:00 |
Pietro Gagliardi
|
5f454a6114
|
Some more refactoring in noinitwrongthread.c. The different components are almost isolated!
|
2019-06-09 21:00:33 -04:00 |
Pietro Gagliardi
|
ee9df0491f
|
Simplified noinitwrongthread.c further. This will form the basis of a simplified general event handler.
|
2019-06-09 19:00:01 -04:00 |
Pietro Gagliardi
|
ef05d40fad
|
Fixed test execution.
|
2019-06-09 18:19:43 -04:00 |
Pietro Gagliardi
|
a0fd823328
|
Just restored TestEventErrors as is for now. There's definitely room for cleanup here.
|
2019-06-09 18:08:50 -04:00 |
Pietro Gagliardi
|
94d638e601
|
And finished rewriting test/noinitwrongthread.c.
|
2019-06-09 16:14:18 -04:00 |
Pietro Gagliardi
|
91c1e8e517
|
And rewrote TestFunctionsFailBeforeInit. This should work nicely.
|
2019-06-09 15:29:03 -04:00 |
Pietro Gagliardi
|
5f011acc0c
|
Somewhat hackily worked around strdup wonk.
|
2019-06-09 14:03:27 -04:00 |
Pietro Gagliardi
|
24320ce784
|
Disabled the event error tests and started rewriting the no uiInit()/wrong thread checks to use the new programmer error test hooks. I'll also start taking care of the sharedbits cruft now by just providing Strdup and FreeStrdup as utility functions, because bleh.
|
2019-06-09 13:57:02 -04:00 |
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
|
e808d85e01
|
Added function names to the wrong struct size error.
|
2019-06-09 08:50:12 -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
|
379fc230e5
|
More compile fixes. sharedbits is starting to get really messy.
|
2019-06-08 18:39:59 -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
|
26e492539d
|
Renamed uiFreeEvent() to uiEventFree() for consistency with uiControlFree().
|
2019-06-02 22:04:25 -04:00 |
Pietro Gagliardi
|
c6294f163f
|
Okay, added uiFreeEvent() error tests. Now back to uiControl.
|
2019-06-02 19:11:22 -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
|
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
|
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
|
f2ce4c8f56
|
Split the shared and static resources on the Windows tester, for the same reason.
|
2019-06-01 10:29:48 -04:00 |
Pietro Gagliardi
|
48cd6e1dd8
|
Cleaned #include directives so C standard library headers are sorted and so each source file only includes one header file. This makes things clenaer, and alos allows us to more properly strip unneeded headers later.
|
2019-06-01 09:27:17 -04:00 |
Pietro Gagliardi
|
a93f5c8f53
|
Split the strsafe strncpy() into its own header file and simplified its usage a bit.
|
2019-05-31 22:34:34 -04:00 |
Pietro Gagliardi
|
7d0f8403ab
|
Fixed build errors on other platforms. This is a headache and a half :D I should split the files into strsafe_vsnprintf and strsafe_strncpy, but I want to share this file as is in one piece for now.
|
2019-05-31 22:07:51 -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
|
84a4fd8915
|
And wrote it on Windows. Okay, now we can FINALLY start working on controls!!!!!
|
2019-05-29 01:02:15 -04:00 |
Pietro Gagliardi
|
fd770430a9
|
And properly added init and thread checks to the uiEvent functions. Now we just need to do the same on the other platforms and THEN FINALLY we can move on to controls.
|
2019-05-29 00:41:36 -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
|
cceae4845e
|
Fixed build issues and added more cases to allcalls.h. I'm going to fix the lack of idnent on the diff()s before continuing.
|
2019-05-28 22:53:40 -04:00 |
Pietro Gagliardi
|
b5927353e0
|
Started work to test that functions dislike being called before uiInit() or on a different thread; better to do it now than later.
|
2019-05-28 21:54:13 -04:00 |
Pietro Gagliardi
|
a6c1e1ed17
|
Fixed build errors. Now to fix runtime errors.
|
2019-05-27 11:02:23 -04:00 |
Pietro Gagliardi
|
afb87bda23
|
And filled in the remainder of the uiEvent error tests. Also more TODOs. We can now FINALLY move on to uiControl :D
|
2019-05-26 21:59:59 -04:00 |
Pietro Gagliardi
|
7cb4f010d4
|
Cleaned up programmer error testing code.
|
2019-05-26 20:19:02 -04:00 |
Pietro Gagliardi
|
7808b3ee94
|
Added the hook for checking programmer error responses, and made sure it works. Now to simplify it.
|
2019-05-26 15:41:22 -04:00 |
Pietro Gagliardi
|
9060ef3852
|
More TODOs.
|
2019-05-26 15:08:51 -04:00 |
Pietro Gagliardi
|
e4f5b4f548
|
And filled in the missing gaps in the non-error cases of the uiEvent tests. Almost ready to move on!
|
2019-05-26 15:06:28 -04:00 |
Pietro Gagliardi
|
07c613b2e1
|
Stripped the path from test log filenames.
|
2019-05-26 13:31:55 -04:00 |
Pietro Gagliardi
|
dbbf84becc
|
Filled in the rest of TestEventBlocksHonored.
|
2019-05-26 13:26:58 -04:00 |
Pietro Gagliardi
|
b8b1123027
|
And rewrote TestEventBlocksHonored. Now we can expand it.
|
2019-05-25 22:30:08 -04:00 |
Pietro Gagliardi
|
f77f8d49d3
|
Restructured TestEventSendersHonored to use the new deinterleaved handler; this also makes it use baseParams and creates events per impl rather than globally.
|
2019-05-25 22:21:16 -04:00 |
Pietro Gagliardi
|
a8ab5be01a
|
Started deinterlacing the handler got and want parameters into struct handler.
|
2019-05-25 22:07:56 -04:00 |
Pietro Gagliardi
|
3cd08a5b2d
|
Simplified the event structures. Next step is to deduplicate handlers.
|
2019-05-25 21:19:22 -04:00 |
Pietro Gagliardi
|
c41ac17dd4
|
Rewrote test/events.c to localize the actual uiEventFire() testing code.
|
2019-05-25 21:11:03 -04:00 |
Pietro Gagliardi
|
d6cde02825
|
More event tests. Okay, I definitely need a better way to handle these.
|
2019-05-23 21:42:52 -04:00 |
Pietro Gagliardi
|
5a6c302ae0
|
Added TestEventSendersHonored.
|
2019-05-22 11:44:30 -04:00 |
Pietro Gagliardi
|
bf3492cd9c
|
Cleaned up event test names.
|
2019-05-22 11:16:15 -04:00 |
Pietro Gagliardi
|
d346a8ca8e
|
Laid out the other things to test for events.c.
|
2019-05-21 21:12:01 -04:00 |
Pietro Gagliardi
|
43fd636071
|
And cleaned up the subtest architecture and made both tests properly subtested. Now for the rest of the tests.
|
2019-05-21 21:01:13 -04:00 |
Pietro Gagliardi
|
bf1172bc0a
|
Parameterized TestBasicEventsAddDeleteEventHandlers. Now we'll split it into subtests.
|
2019-05-21 20:16:41 -04:00 |
Pietro Gagliardi
|
009a9c25aa
|
Oops (only spotted it when forcing a failure).
|
2019-05-20 22:26:11 -04:00 |
Pietro Gagliardi
|
7be128d5bb
|
Changed TestBasicEventsSingleHandler to use subtests. It works!
|
2019-05-20 22:20:04 -04:00 |