Commit Graph

4409 Commits

Author SHA1 Message Date
Pietro Gagliardi 7cdd6ee38c Finished all the necessary bits to implement what little of uiWindow we have now on Windows. Now to fill in the tests. 2020-06-07 14:10:16 -04:00
Pietro Gagliardi 188d9f736f Reintegrated UTF-16 stuff we need immediately and prepared the test suite for it. 2020-06-06 22:30:50 -04:00
Pietro Gagliardi 3f392d04ce Started migrating uiWindow on Windows. Oh boy it's UTF-16 time! 2020-06-06 19:27:05 -04:00
Pietro Gagliardi d5c06108d6 Added the missing noinitwrongthread Unix tests. 2020-06-02 22:52:56 -04:00
Pietro Gagliardi 1dd0372593 Set up a new system for designated static const struct initializers on C++. Also added the missing noinitwrongthread tests on Haiku. 2020-06-02 22:40:54 -04:00
Pietro Gagliardi c07a7861d4 More TODOs. 2020-05-31 19:49:59 -04:00
Pietro Gagliardi 860eb0fae3 And implemented uiWindow stuff on Haiku. 2020-05-31 19:00:03 -04:00
Pietro Gagliardi 218439c215 Did all the uiWindow stuff on GTK+. 2020-05-31 13:37:56 -04:00
Pietro Gagliardi eb1862afe1 Deduplicated noinitwrongthread.c and its OS-specific files. 2020-05-30 21:24:58 -04:00
Pietro Gagliardi 80ddb4df8f Rounded out uiWindow and uiDarwinControl error conditions and error condition documentation. 2020-05-30 21:17:17 -04:00
Pietro Gagliardi d423688def And added (in a somewhat dirty for now way) the noinitwrongthread.c case for uiDarwinControlHandle(). 2020-05-25 22:42:44 -04:00
Pietro Gagliardi de3598df80 Added 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... 2020-05-25 22:35:25 -04:00
Pietro Gagliardi 0dd4bec2af Added 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. 2020-05-25 22:13:48 -04:00
Pietro Gagliardi 16d2380adc Added the UTF-8 tests to the uiWindow test. 2020-05-25 19:48:59 -04:00
Pietro Gagliardi 9bc2cccb2d More work on test/utf8.c. Now to integrate this into test/window.c. 2020-05-25 15:43:28 -04:00
Pietro Gagliardi aa954e952a Unicode language lawyering. 2020-05-25 14:19:37 -04:00
Pietro Gagliardi 4c5434d76e More TODOs. 2020-05-25 02:00:16 -04:00
Pietro Gagliardi c71fbe29c2 Wrote some code for helping with UTF-8 test cases. 2020-05-25 01:47:19 -04:00
Pietro Gagliardi 2f9aaeeb62 Started writing tests for uiWindow. 2020-05-24 18:08:48 -04:00
Pietro Gagliardi 0be1273dab Finished our initial implementation of uiWindow on macOS to our previous spec. Now to write tests. 2020-05-24 17:23:52 -04:00
Pietro Gagliardi ba6f2865df Started 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... 2020-05-22 22:43:33 -04:00
Pietro Gagliardi a65bbfa057 Started re-adding uiWindow; this just lays down the bare minimum API we're re-adding. 2020-05-22 18:46:48 -04:00
Pietro Gagliardi 8db1d5474b Included 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). 2020-05-22 16:32:04 -04:00
Pietro Gagliardi 6fe7c1ef66 Added 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! 2020-05-17 22:18:47 -04:00
Pietro Gagliardi 7aeb937b93 Added 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. 2020-05-13 12:43:40 -04:00
Pietro Gagliardi e01c732760 More documentation notes. 2020-05-12 17:00:40 -04:00
Pietro Gagliardi 150fa7eaa6 Renamed 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...) 2020-05-12 02:05:30 -04:00
Pietro Gagliardi de35499976 And removed zNEW_test now that everything's integrated back in. 2020-05-12 01:47:14 -04:00
Pietro Gagliardi 1cf87d5c5e And Haiku. 2020-05-12 01:46:36 -04:00
Pietro Gagliardi de5205d594 And with Unix. 2020-05-11 22:37:17 -04:00
Pietro Gagliardi e73c3363ec Reintegrated the Windows control tests. We may be close to getting rid of zNEW_test! 2020-05-11 22:30:30 -04:00
Pietro Gagliardi 22bcf088e9 And reintegrated the macOS tests. Now for the other platforms. 2020-05-11 22:19:07 -04:00
Pietro Gagliardi 76eef19a2b Clarified something in test/errors.c. 2020-05-11 21:03:31 -04:00
Pietro Gagliardi 19a776e446 And 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... 2020-05-11 21:02:04 -04:00
Pietro Gagliardi b1d733e9a2 Reworked 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. 2020-05-11 20:55:34 -04:00
Pietro Gagliardi fdf9a1245d Wrote 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. 2020-05-11 19:48:02 -04:00
Pietro Gagliardi 1cf4a3df21 Filled 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. 2020-05-11 10:32:17 -04:00
Pietro Gagliardi dfd045b3cc Resolved 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. 2020-05-11 00:52:22 -04:00
Pietro Gagliardi 9b1be0c77a More TODO resolution. 2020-05-10 23:59:09 -04:00
Pietro Gagliardi e71c717b31 Made 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. 2020-05-10 22:00:49 -04:00
Pietro Gagliardi c52656f2c2 Explicitly specified 0 as the invalid control type and stopped using 5 as an invalid control type. 2020-05-10 21:54:37 -04:00
Pietro Gagliardi 3689d3c96a More TODOs. 2020-05-10 21:45:33 -04:00
Pietro Gagliardi b710ef6228 Fixed building these tests. 2020-05-10 21:39:44 -04:00
Pietro Gagliardi 436cb567dc Integrated 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. 2020-05-10 21:29:03 -04:00
Pietro Gagliardi d584842628 Started reintegrating control tests. 2020-05-10 17:58:48 -04:00
Pietro Gagliardi e7917500c1 Clarified doc/controls.md a bit, and introduced more requirements. Now to re-introduce its tests. 2020-05-10 16:24:43 -04:00
Pietro Gagliardi 5d17ee6e70 Finished reintegrating test/noinitwrongthread.c. That was easy! 2020-05-10 14:57:03 -04:00
Pietro Gagliardi 21a0550076 Reintegrated test/noinitwrongthread.c into the fold. Now to test. 2020-05-10 14:49:11 -04:00
Pietro Gagliardi f79a0892f2 More TODOs. 2020-05-10 13:09:00 -04:00
Pietro Gagliardi 1daac120af Switched haiku status_t printing to use a constant; also gave the constant a self-descriptive name for readability. 2020-05-10 12:55:47 -04:00