Time Nick Message 15:02 wrrrzr Why we migrate to catch? 15:26 MTDiscord I think I outlined my reasoning in the associated issue. But in summary, Catch is well-known, and provides much more more readable information on test failures. I was running into the problem that I could not even figure out which tests were failing, because the failure messages are buried in the test output. 15:27 MTDiscord #13610 15:27 ShadowBot https://github.com/luanti-org/luanti/issues/13610 -- Migrate unit tests to Catch2 framework. 15:38 MTDiscord see also e.g. https://github.com/luanti-org/luanti/pull/16040#issuecomment-2816704153 15:59 MTDiscord That's an intriguing idea to make test.h use Catch2 under the hood, Lars. It almost seems trivially easy except that I don't think TEST_CASE will work inside a function scope (haven't tried it though). 16:00 MTDiscord If I'm right, you can't simply change REGISTER_TEST_CASE to be a TEST_CASE that invokes the described method. 16:06 MTDiscord yes, that's basically the problem. and REGISTER_TEST_CASE expects a void function pointer (so a lambda won't work). but i think using macros something should be possible. 16:15 MTDiscord Yes, it should... you can end the function block and then do the TEST_CASE. Just like SQL injection. 16:16 MTDiscord Oh, but then you also need a mechanism to open another function definition, and make sure that gets called. 16:16 MTDiscord So you end up with something bordering on Catch2 macro sophistication. 16:16 MTDiscord Sounds like it's complicated enough that we absolutely have to do it to show off. 16:16 MTDiscord hehe 16:52 pgimeno would this patch be considered for minetest_game? http://www.formauri.es/personal/pgimeno/pastes/fix_dry_grass_on_dirt.patch 16:56 pgimeno it is formatted so it can be imported with `git am` 16:58 MTDiscord seems fine to me. though there should maybe be a comment left in the code to prevent someone making this mistake again? 17:12 pgimeno yeah I thought the same after sending it 17:17 sfan5 if you add a comment we can merge it 17:18 pgimeno done, refresh 17:20 sfan5 done 17:20 pgimeno thanks 21:42 MTDiscord Pretty sure function pointers can bind to a corresponding lambda. 21:43 MTDiscord if there are no captures, yes. 21:43 MTDiscord Does that context require captures? 21:43 MTDiscord yes 22:11 [MatrxMT] sfan5: would you like to have another look at #13125 (after the hack I introduced to fix the "stuck notification" issue), or shall we just merge it now? 22:11 ShadowBot https://github.com/luanti-org/luanti/issues/13125 -- Android: Persistent notification while ingame by srifqi 22:57 sfan5 I'll check 22:58 sfan5 the hack is just to re-show it every 10 seconds? sounds ok 22:58 sfan5 maybe consider making the duration longer 23:30 [MatrxMT] yeah, and the user shouldn't notice anything of that since it just replaces the existing notification. it's still observable though, e.g. if you try to dismiss the notification 23:33 [MatrxMT] what duration would you suggest? I suppose it's a trade-off between "notification stuck shorter after closing" and "less work", but I'm not sure if the work is significant 23:54 [MatrxMT] any core dev's take on #15916? Before that "possible close" goes stale 23:54 ShadowBot https://github.com/luanti-org/luanti/issues/15916 -- Engine crafting system v2 (in lua)