Commit Graph

54 Commits

Author SHA1 Message Date
Pietro Gagliardi 32512c7a5e More TODOs in re previous commit. Okay let's keep going. 2020-05-10 12:15:21 -04:00
Pietro Gagliardi dca16e82b0 Kicking this can down the road because I need to move on (though I may add more TODOs about it) 2020-05-10 11:58:17 -04:00
Pietro Gagliardi 3a31401190 Okay, started writing the interleaving tests. I'm starting to feel like this thread-based model of testing isn't the right approach... 2020-05-10 11:50:05 -04:00
Pietro Gagliardi 4163facc11 Settled most of the remaining non-timer TODOs in test/initmain.c. Just one more (duplicated on two different tests) to go! 2020-05-09 23:10:58 -04:00
Pietro Gagliardi 87e042a309 Wrote in the remaining programmer error tests in test/initmain.c. 2020-05-09 22:34:42 -04:00
Pietro Gagliardi c9339e568c Finished 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(). 2020-05-09 22:14:31 -04:00
Pietro Gagliardi 7a83baefe8 Started reworking all the uiQueueMain() tests to be more robust. 2020-05-09 21:54:26 -04:00
Pietro Gagliardi bbae57ea29 Refined the init tests slightly, started a new model for the QueueMain tests, and allowed tests to run for now. 2020-05-09 20:04:14 -04:00
Pietro Gagliardi 73afdaaeb2 Improved the main QueueMain test. 2020-05-09 16:54:18 -04:00
Pietro Gagliardi c39bd66d38 Cleaned up the init tests. 2020-05-09 16:35:01 -04:00
Pietro Gagliardi a2f0d5c2cd Implemented the rest of the uiInit() tests. A bit repetitive, but it works. 2020-05-09 02:38:07 -04:00
Pietro Gagliardi 9fcc4d500c Adapted test/errors.c to test for the lack of a programmer error. 2020-05-09 02:33:18 -04:00
Pietro Gagliardi 41e62cdce1 Added basic testing for init failing. Now to add support for testing for the lack of a programmer error. 2020-05-09 02:04:51 -04:00
Pietro Gagliardi 761d3a434a Started to fix init/main tests. 2020-05-09 01:45:09 -04:00
Pietro Gagliardi 8b400f33f7 More initmain.c integration. I think we're now complete to what it used to be for that one file. Now I have to figure out how to readd subtests... 2020-01-23 21:44:45 -05:00
Pietro Gagliardi 7bb67c3e46 More adaptations. 2020-01-23 21:36:50 -05:00
Pietro Gagliardi b1b60f6077 Reintegrated timerSleep() (now threadSleep() because I'm not bloating things further). initmain.c fully restored! 2020-01-21 15:13:24 -05:00
Pietro Gagliardi b722922428 Reintegrated the test's thread helper functions and the thread test functions in initmain.c. Phew. 2020-01-21 14:19:52 -05:00
Pietro Gagliardi d51a885431 Reintroduced the test type without uiInit() and added uiInit() to most normal tests. Now to start (slowly) reactivating tests. 2020-01-21 01:16:47 -05:00
Pietro Gagliardi f75875e51b And finished reintegrating enough for one test case. 2020-01-20 20:52:46 -05:00
Pietro Gagliardi 75db846736 Looks like we're going to need to turn the test suite into a subprocess-based suite now rather than later, because of Haiku not allowing BApplication::Run() to be called more than once. 2020-01-19 18:59:43 -05:00
Pietro Gagliardi a9145c2f35 Started writing the uiControl functionality tests. Also more TODOs. Let's fix build errors next. 2019-06-16 21:44:49 -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 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 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 07dc3ee025 Finished the test set implementation, moving the tester itself to use it. This also moves uiInit() into main(); in TestInit, we'll hook into uiInit() to avoid actually doing the initialization. 2019-05-10 21:16:29 -04:00
Pietro Gagliardi d49f8ae7e6 Switched the macOS code to use timerprivInt128ToUint64(). Also rearranged the arguments of timerprivInt128ToInt64() and added proper timerDurationMin/Max constants instead of the incorrect-for-that-function timerTimeMin/Max in the Windows code. 2019-05-05 11:16:17 -04:00
Pietro Gagliardi ff803bf792 And implemented 128-bit muldiv on Windows. 2019-05-05 11:03:17 -04:00
Pietro Gagliardi ee3e587ddc Fixed build errors on Windows. 2019-05-04 21:47:04 -04:00
Pietro Gagliardi 98093ed46e Formatted test results across multiple lines in the same way as in Go. Also prettyprinted diffs in initmain.c. 2019-05-04 21:13:47 -04:00
Pietro Gagliardi 4c097f93f7 Implemented error checks in test/initmain.c. 2019-05-04 19:21:57 -04:00
Pietro Gagliardi 09e98af110 Removed a stale TODO caused by inaccurate timer code (that was in response to the old clock()-based Unix code). 2019-05-04 19:04:32 -04:00
Pietro Gagliardi 00411a4d07 Moved all the test infrasturcture files into a subdirectory of test/ called lib/. 2019-05-04 16:53:54 -04:00
Pietro Gagliardi 57abc83fe3 And split all the thread stuff into their own file. Almost done with all this test library cleanup! 2019-05-04 16:47:56 -04:00
Pietro Gagliardi e9fd8cc878 And made timerRunWithTimeout() use the non-reentrant code on all architectures. Windows code done. 2019-05-03 10:41:27 -04:00
Pietro Gagliardi 020cabc61e Fixed build issues. Now to fix runtime issues: we'll have to use reentrancy everywhere, because rcx is clobbered by GetMessage(). 2019-05-03 10:32:31 -04:00
Pietro Gagliardi dbfea28313 And finished adjusting the tests accordingly. Now to test. 2019-05-03 02:02:20 -04:00
Pietro Gagliardi 313f5864f5 Fixed the timer functions on Windows. 2019-05-02 22:03:57 -04:00
Pietro Gagliardi 74468bb38f And implemented the multithreading stuff on Unix and Darwin. We can finally continue re-adding stuff to libui! 2019-04-28 21:22:11 -04:00
Pietro Gagliardi df8eadb980 And added the multithreaded uiQueueMain() tests. 2019-04-28 20:45:53 -04:00
Pietro Gagliardi 49bde22f81 More TODOs. 2019-04-28 14:54:33 -04:00
Pietro Gagliardi b20bf2d1c9 Wrote TestQueueMain_Sequence. 2019-04-28 14:41:30 -04:00
Pietro Gagliardi 64478bd5b0 Finished cleaning up the TimerNsec naming wonk. 2019-04-28 13:19:04 -04:00
Pietro Gagliardi 1bc2297597 Added a facility to do timeouts in test functions. Also started cleaning up the weird TimerNsec abstractions. 2019-04-28 13:12:40 -04:00
Pietro Gagliardi 9c70782a0f Added uiMain() and friends on macOS and refined the tests. So now we'll need to add a timeout mechanism because that sendEvent: stuff really is still neeeded and I'd like to prevent shenanigans later. 2019-04-28 11:48:21 -04:00
Pietro Gagliardi 23591eeefa Executive decision: drop uiUnint(). This was really more for double-checking *my* work, mostly with regards to memory management, and we could probably do that in the test suite instead, or even with AddressSanitizer. 2019-04-21 20:59:36 -04:00
Pietro Gagliardi 484989e925 Implemented uiInit() on macOS. The tests work so far! 2019-04-20 21:38:26 -04:00