Re: Euphoria 4.0 and diamond
- Posted by mattlewis (admin) Feb 21, 2009
- 767 views
there is a small problem with the diamond library of Mike Nelson (found in the archiv) and Euphoria 4.0 rev 1387.
Running demo.ex or event.ex with eu.ex will show this:
D:\Euphoria\diamond\Demo>exwc c:\EUPHORIA\SOURCE40\eu.ex demo.ex
c:\EUPHORIA\SOURCE40\fwdref.e:264 in procedure patch_forward_variable()
third argument of find_from() is out of bounds (0)
This looks like an issue with the way the forward reference was recorded.
I see that you have a lot of test programs for Euphoria 4.0. How do you build a test program for this case? What would be the best way to create a test program at all? Since some time there is a different behaviour in a special case with the use of type object (machine level exception error), but I do not know how to shorten the code in my application.
What I typically do it just to have some minimal program that reproduces the error, so that I can identify the root cause. Then I can write a test to capture this issue.
Usually, there is a unit test file that covers the area this deals with, but if not, I just create a new one. Basically, you have to include std/unittest.e, use the test_*() procedures, and put a test_report() at the end.
About benchmark with the diamond library:
I did not yet try, but would speedtst.ex run faster if I would use public instead of global in the library?
It should only affect the parsing time, but not the running time, which is what I assume is being measured here.
Matt