Merge pull request #500 from L4r0x/table-mem-leak
Pietro Gagliardi
2020-06-07 21:09:04 -0400
5ca4ccb30bMerge branch 'master' into remodel
Pietro Gagliardi
2020-06-07 21:06:50 -0400
4ee9c47ddcLooks like meson now requires a newer ninja than what ships with whatever version of whatever Debian-derived distribution Azure Pipelines uses. Use ninja from pip instead (it's a special distribution maintained by the SciPy guys, apparently).
Pietro Gagliardi
2020-06-07 21:05:16 -0400
6f4610f82aOops
Pietro Gagliardi
2020-06-07 20:58:11 -0400
6b124b6f55Fix memory leak in uiTable setEditable on unix.
Lars Wrenger
2020-06-07 20:41:31 +0200
1c7718ec58And updated the tests on Windows. It works!
Pietro Gagliardi
2020-06-07 14:36:56 -0400
7cdd6ee38cFinished all the necessary bits to implement what little of uiWindow we have now on Windows. Now to fill in the tests.
Pietro Gagliardi
2020-06-07 14:10:16 -0400
54567bd4f6Fix memory leak uiTable setEditable on unix.
Lars Wrenger
2020-06-07 10:53:10 +0200
188d9f736fReintegrated UTF-16 stuff we need immediately and prepared the test suite for it.
Pietro Gagliardi
2020-06-06 22:29:06 -0400
3f392d04ceStarted migrating uiWindow on Windows. Oh boy it's UTF-16 time!
Pietro Gagliardi
2020-06-06 19:27:05 -0400
d5c06108d6Added the missing noinitwrongthread Unix tests.
Pietro Gagliardi
2020-06-02 22:52:56 -0400
1dd0372593Set up a new system for designated static const struct initializers on C++. Also added the missing noinitwrongthread tests on Haiku.
Pietro Gagliardi
2020-06-02 22:40:54 -0400
c07a7861d4More TODOs.
Pietro Gagliardi
2020-05-31 19:49:59 -0400
860eb0fae3And implemented uiWindow stuff on Haiku.
Pietro Gagliardi
2020-05-31 19:00:03 -0400
218439c215Did all the uiWindow stuff on GTK+.
Pietro Gagliardi
2020-05-31 13:37:56 -0400
eb1862afe1Deduplicated noinitwrongthread.c and its OS-specific files.
Pietro Gagliardi
2020-05-30 21:24:58 -0400
80ddb4df8fRounded out uiWindow and uiDarwinControl error conditions and error condition documentation.
Pietro Gagliardi
2020-05-30 21:17:17 -0400
d423688defAnd added (in a somewhat dirty for now way) the noinitwrongthread.c case for uiDarwinControlHandle().
Pietro Gagliardi
2020-05-25 22:42:44 -0400
de3598df80Added tests for the uiWindow methods being called after init/on the right thread. To actually implement those, wrote OS-independent wrappers for the uiWindow functions. This will likely become a pattern throughout libui...
Pietro Gagliardi
2020-05-25 22:35:25 -0400
0dd4bec2afAdded uiDarwinControlHandle(), and added it to uiWindow, and added uiWindow handle tests (including underlying string tests) to the test suite. Oof. Also I just remembered we're missing tests of these new functions in noinitwrongthread.c.
Pietro Gagliardi
2020-05-25 22:13:48 -0400
16d2380adcAdded the UTF-8 tests to the uiWindow test.
Pietro Gagliardi
2020-05-25 19:48:59 -0400
9bc2cccb2dMore work on test/utf8.c. Now to integrate this into test/window.c.
Pietro Gagliardi
2020-05-25 15:43:28 -0400
aa954e952aUnicode language lawyering.
Pietro Gagliardi
2020-05-25 14:19:37 -0400
4c5434d76eMore TODOs.
Pietro Gagliardi
2020-05-25 02:00:16 -0400
c71fbe29c2Wrote some code for helping with UTF-8 test cases.
Pietro Gagliardi
2020-05-25 01:47:19 -0400
2f9aaeeb62Started writing tests for uiWindow.
Pietro Gagliardi
2020-05-24 18:08:48 -0400
0be1273dabFinished our initial implementation of uiWindow on macOS to our previous spec. Now to write tests.
Pietro Gagliardi
2020-05-24 17:23:52 -0400
ba6f2865dfStarted reintegrating uiWindow on macOS. I didn't think the implData variable naming through... Also made uiWindow a mere typedef to uiControl; I'll need to copy the handle logic from Windows to make this robust, or something to that effect...
Pietro Gagliardi
2020-05-22 22:43:33 -0400
a65bbfa057Started re-adding uiWindow; this just lays down the bare minimum API we're re-adding.
Pietro Gagliardi
2020-05-22 18:46:48 -0400
8db1d5474bIncluded testhooks.h from uipriv.h and test.h, to make things easier to write (we won't have to keep remembering to include it in every file) and to clean up (ditto, but for removal).
Pietro Gagliardi
2020-05-22 16:32:04 -0400
6fe7c1ef66Added a UTF-8 sanitization routine. This will be needed for titles on uiWindow. Reintroduced our copy of the utf library. This should really be part of utf; I'll have to decide whether to test this or not. Made that a TODO for now. I'll be testing bad UTF-8 inputs on each function that takes UTF-8 strings anyway, just to be safe. Now we can finally add uiWindow!
Pietro Gagliardi
2020-05-17 22:18:47 -0400
7aeb937b93Added methods to uiControl to catch and handle parent changing from the perspective of the individual controls. This will be used to implement the transition from not being backed by an OS handle to being backed by one and back on Windows, and should be all we need to start re-adding controls after uiWindow.
Pietro Gagliardi
2020-05-13 12:38:44 -0400
e01c732760More documentation notes.
Pietro Gagliardi
2020-05-12 17:00:40 -0400
309c1862d5Set column title on OS X 10.9.
Mansour Moufid
2020-05-12 12:25:30 -0400
150fa7eaa6Renamed testparent to testrunner. (Whatever this became wasn't going to be testparent anyway; that was me thinking ahead to XCTest for macOS testing, which we're almost to the point of...)
Pietro Gagliardi
2020-05-12 02:05:30 -0400
de35499976And removed zNEW_test now that everything's integrated back in.
Pietro Gagliardi
2020-05-12 01:47:14 -0400
1cf87d5c5eAnd Haiku.
Pietro Gagliardi
2020-05-12 01:46:36 -0400
de5205d594And with Unix.
Pietro Gagliardi
2020-05-11 22:37:02 -0400
e73c3363ecReintegrated the Windows control tests. We may be close to getting rid of zNEW_test!
Pietro Gagliardi
2020-05-11 22:30:30 -0400
22bcf088e9And reintegrated the macOS tests. Now for the other platforms.
Pietro Gagliardi
2020-05-11 22:19:07 -0400
76eef19a2bClarified something in test/errors.c.
Pietro Gagliardi
2020-05-11 21:03:31 -0400
19a776e446And integrated the cycle-checking code. Woo it's got tests! Now we need to worry about the OS-side test code, assuming I don't have any more pesky TODOs to fix immediately...
Pietro Gagliardi
2020-05-11 21:02:04 -0400
b1d733e9a2Reworked programmer error tests to limit what they catch. The cycle checking tests now correctly crash and burn because the programmer errors they throw are elsewhere. Now to actually hook up the cycle checking! Also added some notes to test/errors.c to explain what we're doing and also fixed the build.
Pietro Gagliardi
2020-05-11 20:54:20 -0400
fdf9a1245dWrote the code to check for parent cycles. I'm not going to actually hook it up yet; I want to resolve the one TODO about limiting the scope of the checkProgrammerError() calls first.
Pietro Gagliardi
2020-05-11 19:48:02 -0400
1cf4a3df21Filled in the missing uiControl tests and demoted the non-uiControl requirements to TODOs as I'm not sure how sensible those requirements are. I'll probably bring them back shortly =P Now to implement cycle checking.
Pietro Gagliardi
2020-05-11 10:32:17 -0400
dfd045b3ccResolved all the TODOs in test/controls.c I care to right now. I still need to write tests for the other failure conditions that aren't tested yet.
Pietro Gagliardi
2020-05-11 00:52:22 -0400
9b1be0c77aMore TODO resolution.
Pietro Gagliardi
2020-05-10 23:59:09 -0400
e71c717b31Made the test for an invalid control type slightly more robust by not using either 0 or 5 for the fake object (but rather some other value that isn't the constant and that's also conveniently ASCII) and deduplicating the redundant tests.
Pietro Gagliardi
2020-05-10 22:00:49 -0400
c52656f2c2Explicitly specified 0 as the invalid control type and stopped using 5 as an invalid control type.
Pietro Gagliardi
2020-05-10 21:54:37 -0400
3689d3c96aMore TODOs.
Pietro Gagliardi
2020-05-10 21:45:33 -0400
b710ef6228Fixed building these tests.
Pietro Gagliardi
2020-05-10 21:39:44 -0400
436cb567dcIntegrated the contents of the old controls_errors.cpp directly into controls.c. We need to rework some test control stuff to get this to compile, and we'll also need to add more test cases for things in the docs that are not in this file.
Pietro Gagliardi
2020-05-10 21:29:03 -0400
d584842628Started reintegrating control tests.
Pietro Gagliardi
2020-05-10 17:58:48 -0400
e7917500c1Clarified doc/controls.md a bit, and introduced more requirements. Now to re-introduce its tests.
Pietro Gagliardi
2020-05-10 16:24:43 -0400
5d17ee6e70Finished reintegrating test/noinitwrongthread.c. That was easy!
Pietro Gagliardi
2020-05-10 14:57:03 -0400
21a0550076Reintegrated test/noinitwrongthread.c into the fold. Now to test.
Pietro Gagliardi
2020-05-10 14:49:11 -0400
f79a0892f2More TODOs.
Pietro Gagliardi
2020-05-10 13:09:00 -0400
1daac120afSwitched haiku status_t printing to use a constant; also gave the constant a self-descriptive name for readability.
Pietro Gagliardi
2020-05-10 12:55:47 -0400
ecb5558d3dAnd changed the other OSs to define uiprivSysMain/Quit().
Pietro Gagliardi
2020-05-10 12:29:58 -0400
32512c7a5eMore TODOs in re previous commit. Okay let's keep going.
Pietro Gagliardi
2020-05-10 12:15:21 -0400
dca16e82b0Kicking this can down the road because I need to move on (though I may add more TODOs about it)
Pietro Gagliardi
2020-05-10 11:58:17 -0400
3a31401190Okay, started writing the interleaving tests. I'm starting to feel like this thread-based model of testing isn't the right approach...
Pietro Gagliardi
2020-05-10 11:50:05 -0400
4163facc11Settled most of the remaining non-timer TODOs in test/initmain.c. Just one more (duplicated on two different tests) to go!
Pietro Gagliardi
2020-05-09 23:10:58 -0400
87e042a309Wrote in the remaining programmer error tests in test/initmain.c.
Pietro Gagliardi
2020-05-09 22:34:42 -0400
c9339e568cFinished converting the rest of the existing tests. Now we just need to flesh out the remaining tests for this file, as well as adding the error tests for uiMain() and uiQuit().
Pietro Gagliardi
2020-05-09 22:14:03 -0400
7a83baefe8Started reworking all the uiQueueMain() tests to be more robust.
Pietro Gagliardi
2020-05-09 21:54:26 -0400
bbae57ea29Refined the init tests slightly, started a new model for the QueueMain tests, and allowed tests to run for now.
Pietro Gagliardi
2020-05-09 20:03:51 -0400
73afdaaeb2Improved the main QueueMain test.
Pietro Gagliardi
2020-05-09 16:54:18 -0400
c39bd66d38Cleaned up the init tests.
Pietro Gagliardi
2020-05-09 16:35:01 -0400
a2f0d5c2cdImplemented the rest of the uiInit() tests. A bit repetitive, but it works.
Pietro Gagliardi
2020-05-09 02:38:07 -0400
9fcc4d500cAdapted test/errors.c to test for the lack of a programmer error.
Pietro Gagliardi
2020-05-09 02:33:18 -0400
41e62cdce1Added basic testing for init failing. Now to add support for testing for the lack of a programmer error.
Pietro Gagliardi
2020-05-09 02:04:51 -0400
761d3a434aStarted to fix init/main tests.
Pietro Gagliardi
2020-05-09 01:45:09 -0400
514037ba6cModified common and the macOS port to exhibit the new init/main behavior. Now to adjust the tests.
Pietro Gagliardi
2020-05-09 01:24:40 -0400
faaccd0413Made uiInit() programmer errors actual programmer errors and not normal error returns. This makes the error handling, the documentation, and even the tests much easier, and also makes programmer error handling more consistent. Also defined programmer error cases for uiMain() and uiQuit(). We'll implement all of these next.
Pietro Gagliardi
2020-05-09 01:01:40 -0400
c0e73c67f4Okay, I won't even bother with the overview until I figure out how events will work in the final API, because I legitimately cannot decide how to write this.
Pietro Gagliardi
2020-05-09 00:35:38 -0400
dea7b52605Revert "Made thread names consistent."
Pietro Gagliardi
2020-05-09 00:34:51 -0400
456fb594c0Made thread names consistent.
Pietro Gagliardi
2020-05-09 00:18:06 -0400
7c4d1ae478More TODOs in doc/init-main.md. I'll decide these later. I want to rewrite this to not use the term 'event' to avoid confusion with libui's own event system, since these are talking about all the events that can happen, not just the ones libui allows you to handle...
Pietro Gagliardi
2020-05-08 00:37:56 -0400
69bf71aaa1Decided to hold off on events for now. I'm still not sure about this design and it's holding me back.
Pietro Gagliardi
2020-05-08 00:16:14 -0400
74651b347cMore notes.
Pietro Gagliardi
2020-05-05 10:46:56 -0400
63bda503dcMore notes.
Pietro Gagliardi
2020-04-09 20:39:18 -0400