Re: What's the relationship between OE and Phix and what impact on Exercism?
- Posted by petelomax Jan 27, 2023
- 1133 views
Hmm, possibly: std/unittest.e is [as detailed below] almost but not quite compatible with Phix, which has builtins/unit_test.e instead.
No previous version of Phix has to date shipped with any std/unittest.e, so a quick "get it from" note and/or a `--/**/requires("1.0.2")` would be warranted.
I quickly "fixed" a few issues with clashing TEST_QUIET/SHOW_ALL, removed a few incompatible namespaces, and included builtins\pretty.e instead of std/pretty.e,
(let me know if/when you actually/really need that to be uploaded) however std/unittest.e also defines an incompatible assert() routine which:
a) disagrees with Phix's assert(bool condition, string msg="", object args={}, integer nFrames=1)
b) disagrees with it's own documentation in a way that I just simply cannot understand [ticket merited].
I have got the raindrops test working here, but should future exercises start using assert() that'd kill it.
A final decision as to whether Phix can share with Euphoria is probably left until it is (nearly) complete.
I suppose it would also depend on how easy or difficult it is to fork things and suck any updates over.
I just tried to create a ticket and it failed. I had penned the following:
Parameter name is defined as "a string, the name of the test", but the actual implementation has an else(not sequence name) which...
While you're here, that routine clashes with Phix's assert(bool condition, string msg="", object args={}, integer nFrames=1)
whereby msg=sprintf(msg,args) occurs if needed and nFrames allows errors to be reported in user source code rather than
less helpful builtins/ innards, and assert(true) is silent whereas assert(false) crashes.
To my mind it would be better if test_true() had an optional crash argument, and std/unittest.e users had to call that directly instead.