Run_tests immediately fails

Hello,

I reinstalled my computer and installed Eclipse and PDT. I have code for which i wrote extensive tests. Trying to run the tests after reinstall doesn’t work anymore.

run_tests.

Immediately fails.

Tracing it shows that it gets to a map_list(Goal, List1, List2) prediate which then fails – i.e. no test is called.

Any thoughts on what the issue might be is much appreciated,

Dan

Do you mean maplist/3 or your own custom predicate?

Could it be that you enabled optimization and did not tell the test framework that you want the tests loaded, despite optimization?

I think this should be reconsidered. The original idea is that tests may be embedded in source files and we want to skip loading these for production. That is still fine. It should probably not apply to files that are there only for testing purposes. It is not easy to distinguish the two though. Most of my testing is in normal Prolog files that load the module(s) to be tested and defines the tests.

Thanks Jan,

No, swipl-win.exe is started within eclipse without any command line arguments – so, optimization is not enabled.

The only thing I did that is different to the past is download a version of eclipse: Version: 2.3.1600.v20231201-0110

Which I think is somewhat more recent than the one i used before reinstalling the computer.

Please start not using Eclipse. That simplifies what we are talking about …

Can vs-code be used to work with an interactive debugger?

If yes, are there any instructions on how to configure and use vs-code for swi prolog?

ps.

was there any change in Eclipse – i used to work with it very well but now i notice issues – the latest version of eclipse removed many UI elements that I liked such as (re)consult commenting/uncommenting blocks and others.

In VS-Code there is an extension for syntax highlighting and things like that. If you want to debug or trace your code you can use the integrated Terminal. From there you work exactly as you would from the Terminal (in MacOs) or I think Command Prompt in Windows: you can type swipl to start an interactive session, you can load files, trace or gtrace code.

This is the extension:

Thank you.

The truth is, I liked the eclipse editor with the PDT addon – I preferred it over the built in emacs lik,e editor.

I worked with Eclipse for a number of years very productively. Its a pity that somehow Eclipse is not supported anymore.

All I’m asking is to simply run the code using swipl-win.exe or swipl.exe. Both the PDT Eclipse plugin and the vs-code plugin actively (re)load code AFAIK, so possibly it is messing up something.