Commit Graph

  • 3f4765d116 Renamed diffx() to diff(). Pietro Gagliardi 2019-06-02 01:59:08 -0400
  • 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. Pietro Gagliardi 2019-06-02 01:51:40 -0400
  • 5d1e6a0cf2 Began handling all the other cases. diff() and diff_2str() go away next. Pietro Gagliardi 2019-06-02 01:36:53 -0400
  • 1cf545d369 Started mapping filenames and line numbers back to their appropriate places in the tester. Pietro Gagliardi 2019-06-02 01:13:56 -0400
  • 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. Pietro Gagliardi 2019-06-01 22:03:13 -0400
  • 8980a8663b Cleaned up a TODO. Pietro Gagliardi 2019-06-01 20:46:41 -0400
  • bd2877154f Oh, it turns out there IS a warning for shutting up -pedantic. Woo! Pietro Gagliardi 2019-06-01 20:26:43 -0400
  • 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... Pietro Gagliardi 2019-06-01 20:20:11 -0400
  • 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. Pietro Gagliardi 2019-06-01 12:22:35 -0400
  • 9ad77ac57e Rewrote a TODO. Didn't solve it yet, because I'm genuinely indecisive about this one. Pietro Gagliardi 2019-06-01 12:17:08 -0400
  • 8531710f03 More TODOs. Pietro Gagliardi 2019-06-01 12:11:16 -0400
  • 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 Pietro Gagliardi 2019-06-01 12:05:29 -0400
  • 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. Pietro Gagliardi 2019-06-01 11:40:16 -0400
  • 76fabb37cf Renamed common/init.c to common/main.c. Pietro Gagliardi 2019-06-01 11:24:34 -0400
  • dea7436468 Changed LONGTERMs in windows/ to TODOs. If it's not worth doing soon, it should go in another list of things to do. Pietro Gagliardi 2019-06-01 10:33:03 -0400
  • f2ce4c8f56 Split the shared and static resources on the Windows tester, for the same reason. Pietro Gagliardi 2019-06-01 10:29:48 -0400
  • a8cd121003 Cleaned up resources on Windows. Now to do so for tester. Pietro Gagliardi 2019-06-01 10:24:32 -0400
  • ed378d4e0b Cleaned up some easy-to-fix TODOs on Windows, including a LONGTERM that will not be relevant to libui in its current architecture (that'll be handled with a custom build step that converts resources to source code). Next: making resources.rc truly shared-only to reduce the noise further. Pietro Gagliardi 2019-06-01 10:18:47 -0400
  • 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. Pietro Gagliardi 2019-06-01 09:27:17 -0400
  • a93f5c8f53 Split the strsafe strncpy() into its own header file and simplified its usage a bit. Pietro Gagliardi 2019-05-31 22:34:34 -0400
  • 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. Pietro Gagliardi 2019-05-31 22:07:51 -0400
  • a17b7c8c14 Fixed build errors and simplified error handling in test/noinitwrongthread.c. Now to test this at runtime on all platforms. Pietro Gagliardi 2019-05-31 11:17:11 -0400
  • 644e188e05 And rewrote strncpy(), since strncpy_s() also exists. Now to test the build. Pietro Gagliardi 2019-05-31 10:38:47 -0400
  • 178671a7bd examples/cpp-multithreaded: running flag is atomic Mariusz Kasolik 2019-05-31 14:27:09 +0200
  • 664cf26cdc Changed strcpy() to strncpy(). Let's build on Windows! Pietro Gagliardi 2019-05-31 02:58:57 -0400
  • 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. Pietro Gagliardi 2019-05-31 02:52:51 -0400
  • 3ddaf3052e Fixed build issues on other platforms. That dumb msvcrt macro is next. Pietro Gagliardi 2019-05-31 00:24:12 -0400
  • 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. Pietro Gagliardi 2019-05-31 00:12:08 -0400
  • dca2e5f038 Wrote array_header.h. Now for array_impl.h. Pietro Gagliardi 2019-05-30 23:47:07 -0400
  • 2dd68fc47f Formalized the macro magic that actually works into sharedbits/{start,end}.h. Now to do arrays! Pietro Gagliardi 2019-05-30 23:23:02 -0400
  • 6493faf529 Ah, figured it out. Now to separate these out into a separate header file. Pietro Gagliardi 2019-05-30 23:17:50 -0400
  • 3c6cc53a0a Okay something is definitely not right. Pietro Gagliardi 2019-05-30 23:14:30 -0400
  • 0f4602ee0f Moved the allocation functions to sharedbits/. Not fully working yet... Pietro Gagliardi 2019-05-30 23:11:08 -0400
  • dc8620f9a8 Okay, no more ints that need to be changed. Started splitting out the common allocation and array code into a separate sharedbits/ folder. Pietro Gagliardi 2019-05-30 22:46:22 -0400
  • 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. Pietro Gagliardi 2019-05-30 22:09:45 -0400
  • 468a6d3f6c
    Add missing semicolon Trond Arne Bråthen 2019-05-30 22:29:44 +0200
  • 26fc1804e5
    Add method for inserting ComboBox item Trond Arne Bråthen 2019-05-30 22:00:24 +0200
  • d78dc94a48
    Add method for clearing ComboBox items Trond Arne Bråthen 2019-05-30 15:44:15 +0200
  • d4ecc16dd7
    Add method for removing ComboBox item Trond Arne Bråthen 2019-05-30 09:21:59 +0200
  • b9d445554a Started changing the tests to use bool instead of int. Pietro Gagliardi 2019-05-30 10:33:39 -0400
  • 9daef443b2 Moved uiQueueMain() to common/init.c to avoid having multiple initialized variables; the per-OS versions are now uiprivSysQueueMain(). Also more TODOs. Pietro Gagliardi 2019-05-30 01:39:43 -0400
  • b0e890ca1d Missed a spot again Pietro Gagliardi 2019-05-30 01:18:20 -0400
  • ab5b3076ed Removed uiInitError length checking and just truncated too-long messages with an ellipsis. Also removed the non-printf version of uiprivReportInitError. Pietro Gagliardi 2019-05-30 01:16:33 -0400
  • 3049adbca0 Missed a spot Pietro Gagliardi 2019-05-29 21:12:49 -0400
  • 19ad0d33a3 Changed uiInit() to return bool instead of int, now that we've settled on using bool. Pietro Gagliardi 2019-05-29 21:10:44 -0400
  • edfd5e9157 Place a placeholder controls.md in doc/. Actually, let's do a bit more cleanup first. Pietro Gagliardi 2019-05-29 21:01:04 -0400
  • 84a4fd8915 And wrote it on Windows. Okay, now we can FINALLY start working on controls!!!!! Pietro Gagliardi 2019-05-29 01:02:15 -0400
  • 4815629eef Implemented the thread checks on GTK+. Pietro Gagliardi 2019-05-29 00:54:22 -0400
  • 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. Pietro Gagliardi 2019-05-29 00:41:36 -0400
  • a632d10701 Indented diff bodies (and all other multi-line test log prints) properly. Pietro Gagliardi 2019-05-29 00:35:51 -0400
  • 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. Pietro Gagliardi 2019-05-28 22:53:40 -0400
  • d0dd91d8d8 Started moving GTK+ dependency requirements away from being based on what Ubuntu packaged toward what it actually requires. This change just lists all of them in Compatibility.md for now. Pietro Gagliardi 2019-05-28 22:29:29 -0400
  • b5927353e0 Started work to test that functions dislike being called before uiInit() or on a different thread; better to do it now than later. Pietro Gagliardi 2019-05-28 21:54:13 -0400
  • b3f2214f3e okay what the fuck Pietro Gagliardi 2019-05-27 11:36:59 -0400
  • 79ecadb909 Fuck the industry domination of C++ and its standard not forcing compliance in both C and C++ modes, if this is the case here. If not, then fuck MSVC. Pietro Gagliardi 2019-05-27 11:18:05 -0400
  • a6c1e1ed17 Fixed build errors. Now to fix runtime errors. Pietro Gagliardi 2019-05-27 11:02:23 -0400
  • 2e82d4aad4 Wrote uiprivReportError() on Windows. Now to fix the... lots of compiler errors :| Pietro Gagliardi 2019-05-27 10:45:55 -0400
  • 3721bf0c8e Oops, we have to make the tests work on other platforms too. Done for GTK+. Pietro Gagliardi 2019-05-26 23:25:08 -0400
  • afb87bda23 And filled in the remainder of the uiEvent error tests. Also more TODOs. We can now FINALLY move on to uiControl :D Pietro Gagliardi 2019-05-26 21:59:59 -0400
  • 7cb4f010d4 Cleaned up programmer error testing code. Pietro Gagliardi 2019-05-26 20:19:02 -0400
  • 7808b3ee94 Added the hook for checking programmer error responses, and made sure it works. Now to simplify it. Pietro Gagliardi 2019-05-26 15:41:22 -0400
  • 9060ef3852 More TODOs. Pietro Gagliardi 2019-05-26 15:08:51 -0400
  • e4f5b4f548 And filled in the missing gaps in the non-error cases of the uiEvent tests. Almost ready to move on! Pietro Gagliardi 2019-05-26 15:06:28 -0400
  • 07c613b2e1 Stripped the path from test log filenames. Pietro Gagliardi 2019-05-26 13:31:55 -0400
  • dbbf84becc Filled in the rest of TestEventBlocksHonored. Pietro Gagliardi 2019-05-26 13:26:58 -0400
  • b8b1123027 And rewrote TestEventBlocksHonored. Now we can expand it. Pietro Gagliardi 2019-05-25 22:30:08 -0400
  • f77f8d49d3 Restructured TestEventSendersHonored to use the new deinterleaved handler; this also makes it use baseParams and creates events per impl rather than globally. Pietro Gagliardi 2019-05-25 22:21:16 -0400
  • a8ab5be01a Started deinterlacing the handler got and want parameters into struct handler. Pietro Gagliardi 2019-05-25 22:07:56 -0400
  • 3cd08a5b2d Simplified the event structures. Next step is to deduplicate handlers. Pietro Gagliardi 2019-05-25 21:19:22 -0400
  • c41ac17dd4 Rewrote test/events.c to localize the actual uiEventFire() testing code. Pietro Gagliardi 2019-05-25 21:11:03 -0400
  • d6cde02825 More event tests. Okay, I definitely need a better way to handle these. Pietro Gagliardi 2019-05-23 21:42:52 -0400
  • 5a6c302ae0 Added TestEventSendersHonored. Pietro Gagliardi 2019-05-22 11:44:30 -0400
  • bf3492cd9c Cleaned up event test names. Pietro Gagliardi 2019-05-22 11:16:15 -0400
  • d346a8ca8e Laid out the other things to test for events.c. Pietro Gagliardi 2019-05-21 21:12:01 -0400
  • 43fd636071 And cleaned up the subtest architecture and made both tests properly subtested. Now for the rest of the tests. Pietro Gagliardi 2019-05-21 21:01:13 -0400
  • bf1172bc0a Parameterized TestBasicEventsAddDeleteEventHandlers. Now we'll split it into subtests. Pietro Gagliardi 2019-05-21 20:16:41 -0400
  • 009a9c25aa Oops (only spotted it when forcing a failure). Pietro Gagliardi 2019-05-20 22:26:11 -0400
  • 7be128d5bb Changed TestBasicEventsSingleHandler to use subtests. It works! Pietro Gagliardi 2019-05-20 22:20:04 -0400
  • 102dff6489 And added testingprivOutbufString() and enabled testingTRun(). Now to rewrite the events tests to use it. Pietro Gagliardi 2019-05-20 22:03:56 -0400
  • 57e4e0d13b Removed the computedName field in testingT; we manage the memory for subtest names in testingTRun() itself. Pietro Gagliardi 2019-05-20 21:33:55 -0400
  • 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(). Pietro Gagliardi 2019-05-20 21:22:02 -0400
  • 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). Pietro Gagliardi 2019-05-20 21:10:29 -0400
  • bd666b8ec9 Started writing subtests. I'll need to make a few more structural changes to the test scaffolding for this. Pietro Gagliardi 2019-05-20 20:56:47 -0400
  • 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.) Pietro Gagliardi 2019-05-20 20:07:59 -0400
  • 9f0bb3aacb Fixed uiprivArray/testingprivArray bugs that led to the crash. Now to fix up the rest of the code. Pietro Gagliardi 2019-05-20 11:12:16 -0400
  • a4c6817d33 Rewrote testing.c to use testingprivOutbuf. It doesn't quite work yet... Pietro Gagliardi 2019-05-20 10:57:31 -0400
  • 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. Pietro Gagliardi 2019-05-19 23:15:35 -0400
  • 40508a457c Changed testingSet to use testingprivArray. Pietro Gagliardi 2019-05-19 18:06:58 -0400
  • 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. Pietro Gagliardi 2019-05-19 17:55:31 -0400
  • 8e5a12b869 And changed unusedIDs to use uiprivArray. Now we can transplant this into testing. Pietro Gagliardi 2019-05-19 15:46:09 -0400
  • 02b61c0156 Changed uiEvent.handlers into a uiprivArray; also fixed the buggy implementations of InsertAt and Delete. Pietro Gagliardi 2019-05-19 14:37:32 -0400
  • 745440b1e7 Wrote array manipulation functions. Now to convert events.c to use them. Pietro Gagliardi 2019-05-19 12:52:06 -0400
  • 66f1f75992 Started rearranging things to allow for subtests; I should clean up the allocation stuff in libui first, so they can be borrowed. Pietro Gagliardi 2019-05-19 11:05:20 -0400
  • efb761f5f2 More notes. Pietro Gagliardi 2019-05-19 09:31:32 -0400
  • 35759935ae Added more cases to the AddDelete tests. Now to add subtests so we can more easily pluralize these tests, including handling cases of different senders. Pietro Gagliardi 2019-05-19 01:06:43 -0400
  • a81ea6e3fb Fixed events not being deleted properly. Pietro Gagliardi 2019-05-19 01:00:25 -0400
  • 973696137f Reduced noise in event tests when a handler that should have run did not run. Pietro Gagliardi 2019-05-18 22:21:23 -0400
  • 3b1f5e0e54 Added more event tests. DeleteHandler obviously does not work... and I really need to add subtests. Pietro Gagliardi 2019-05-18 21:21:35 -0400
  • 43f7d1a661 Started the events test suite. Pietro Gagliardi 2019-05-18 13:26:55 -0400
  • 66247ce73d Fixed building events.c. Pietro Gagliardi 2019-05-18 10:00:07 -0400