Scryer-prolog: Question about src/tests/builtins.pl

Created on 5 May 2020  路  7Comments  路  Source: mthom/scryer-prolog

When testing this happens:

$ scryer-prolog src/tests/builtins.pl 
Warning: initialization goal for src/tests/builtins.pl failed
?- 

So this mean the test test_queries_on_builtins failed.

But there is 1 @=< 1.0. at line 117, is it supposed to succeed?

Most helpful comment

But there is 1 @=< 1.0. at line 117, is it supposed to succeed?

In the ISO standard, all floating-point numbers precede all integers, regardless of where they fall on the real number line. The comparison predicates were revised to reflect this just 1 - 2 months ago, so the test is out of date.

All 7 comments

Please also see #411, which would help tremendously to detect such issues earlier.

But there is 1 @=< 1.0. at line 117, is it supposed to succeed?

In the ISO standard, all floating-point numbers precede all integers, regardless of where they fall on the real number line. The comparison predicates were revised to reflect this just 1 - 2 months ago, so the test is out of date.

If one clause fails then how is one supposed to find the culprit? The test is to validate scryer-prolog, not having an _easy_ way to find the culprit makes it hard to what is failing.

Could the test look like this?

test(1) :-
    \+ atom(_).

Process of elimination? It's a poor way to go about it, I agree. I'm open to ideas for improvement.

Process of elimination? It's a poor way to go about it, I agree. I'm open to ideas for improvement.

With the steady progress on Scryer Prolog development, you may soon be able to run Logtalk with it and then use lgtunit to test built-ins, standards compliance, and libraries.

I used this to find some case.

Process of elimination? It's a poor way to go about it, I agree. I'm open to ideas for improvement.

With the steady progress on Scryer Prolog development, you may soon be able to run Logtalk with it and then use lgtunit to test built-ins, standards compliance, and libraries.

That would be great! Streams are quite close to being done.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Qqwy picture Qqwy  路  3Comments

mkohlhaas picture mkohlhaas  路  3Comments

cduret picture cduret  路  4Comments

triska picture triska  路  3Comments

triska picture triska  路  3Comments