Commit Graph
133 Commits
Author SHA1 Message Date
Mark Thom 5a869e8b48 Merge pull request #2777 from adri326/fix-2772-rnd_i-clipping
Fix invalid casts in is/2
2025-01-26 23:14:57 -07:00
Emilie Burgun 0cde8f9a43 Add integration tests for arithmetic operators
This extensively tests the behavior of is/2, both when compiled and in metacalls.
2025-01-27 00:10:56 +01:00
Emilie Burgun b76bdd75e4 Fix #2725 by calling load_context/1 in the unspecified branch of strip_module/3
This fixes #2725, by making it so that `strip_module(Pred, M, P), call(M:P)`
doesn't throw an `instanciation_error` when `Pred` isn't in the form `module:predicate`.

Now, `strip_module(hello, M, P)` will call `load_context(M)`, which unifies `M`
with the topmost module (or `user`).

Two new test cases are added: issue2725.pl, which tests the minimal case id(X) --> X.
and the strip_module(P, M, _), call(M:P) scenario, and module_resolution,
which tests the behavior of strip_module in a few scenarios.
2025-01-12 14:08:28 +01:00
Emilie Burgun eff094cc29 Add tests for PR #2756 2025-01-08 17:57:40 +01:00
Mark Thom d57f871a12 Merge pull request #2681 from hurufu/remove-dcgs-that-have-failed-to-expand
Remove DCGs that have thrown an exception during term expansion
2024-12-25 14:29:38 -07:00
Aleksy Grabowski a599a11169 Remove DCGs that have thrown an exception during term expansion
Some DCG constructs aren't supported and can't be expanded, here we
remove offending DCG rule and don't compile it at all – in a similar
fashion to what we do when incorrect goal was found – whole predicate
isn't getting compiled.

Fixes #2675
2024-12-22 10:37:32 +01:00
bakaq e21c772181 Migrate tests to new API 2024-12-08 20:18:06 -03:00
Bennet Bleßmann 6dd0ec0b98 fix miri 2024-10-04 20:25:02 +02:00
Bennet Bleßmann 8f41c1aa7e Merge remote-tracking branch 'upstream/master' into issue-2588 2024-10-04 19:11:26 +02:00
Bennet Bleßmann 442636c131 add test for load_html 2024-10-04 19:09:35 +02:00
bakaq 806e980cca Be conservative with visibility 2024-09-03 01:02:01 -03:00
Bennet Bleßmann c24a51b633 fix looping from issue 2467 2024-08-17 23:37:12 +02:00
Bennet Bleßmann 058b9c5e51 switch invalid term from type to domain error 2024-08-05 21:25:44 +02:00
Bennet Bleßmann 5a0abd713e change declaration to directive 2024-08-05 21:25:43 +02:00
Bennet Bleßmann df33da111e ajust/add devlaration errors to be more standard compliant 2024-08-05 21:25:43 +02:00
Bennet Bleßmann 880e22d164 adjust errors to be more standard compliant 2024-08-05 21:25:42 +02:00
Bennet Bleßmann 59af900aaf split up CompilationError::InconsistentEntry 2024-08-05 21:25:42 +02:00
Bennet Bleßmann add03cb4ee add test for declaration errors 2024-08-05 21:25:42 +02:00
Bennet Bleßmann b32498b37c adjust ignore reason 2024-07-06 18:24:38 +02:00
Bennet Bleßmann 33793193cc add miri to CI 2024-07-06 15:46:04 +02:00
Bennet Bleßmann fcb41542c3 fix stream.rs UB 2024-07-06 14:30:03 +02:00
Mark Thom 9837187183 add nth_partial_strings_tests for bugs raised in #1827, #2381 2024-04-10 15:50:24 -06:00
Mark Thom c2657cce37 use common test_framework module for several test suites 2024-04-10 15:47:31 -06:00
Mark 0292cb73d3 expand_call_goals/3 should expand meta-predicate subgoals (#2361) 2024-03-19 17:12:26 -06:00
Bennet Bleßmann e5ad70c093 fix compilation of wasm32 test and skip to run wasm32 tests 2024-02-16 23:18:21 +01:00
Adrián Arroyo Calle ec4a8745e7 Add all_mdoules test and fix library(csv) 2024-02-04 21:34:01 +01:00
Mark 673329ddb7 fix reverted tests, ensure files are loaded before goals (#2315) 2024-02-03 11:49:26 -07:00
Mark 6a421dd8b0 fix broken tests 2024-02-02 17:04:47 -07:00
Mark bc616ca7d8 move call_residue_vars/2 from atts.pl to iso_ext.pl 2024-01-25 12:40:24 -07:00
bakaq f02c0eacd8 Make "cargo miri test" actually run 2024-01-09 04:38:53 -03:00
Skgland e66e7c5034 add another test case for os:argv/1 2024-01-04 18:12:38 +01:00
Skgland 7537686d8f cover both args ending in -- and args not ending in -- for os:argv/1 test 2024-01-02 20:48:38 +01:00
Skgland 38f25af47d cover trailing -- and os:argv([]) in os_argv test 2024-01-02 20:23:53 +01:00
Skgland 9a05ca0667 add failing test for os:argv issue
See https://github.com/mthom/scryer-prolog/pull/2263#issuecomment-1874400820
2024-01-02 19:51:09 +01:00
bakaq d9d90d1ae8 Emit warnings as Prolog comments 2023-12-30 17:39:20 -03:00
bakaq f411fb1eb3 Tests for when/2 and solved bug 2023-12-11 12:28:59 -03:00
Skgland 147e47c8eb fix missing .pl file for singleton test case and move .pl files under <testcase>.in/
follow up to #2205
2023-12-06 21:21:28 +01:00
Skgland 57b52fbe90 fix windows test by not disabling normalization
- this re-enables line ending and file path normalization
  - the latter might be unwanted, but there is only a shared flag
  - this might result in too loose matching of / and \ in stdout and stderr as prolog syntax may be mistaken for a path
2023-12-04 22:59:52 +01:00
Skgland b052b62b16 fix formatting 2023-12-04 22:41:25 +01:00
Skgland 4df7e94d56 rename to match toml file
- goals.pl is used by both compound_goal.toml and multiple_goals.toml therefor renamed the later to share a common prefix with goals.pl, to keep them together
2023-12-04 22:23:04 +01:00
Skgland fcf2e2db05 move .pl files from tests-pl next to the .toml of the test that uses them 2023-12-04 22:16:04 +01:00
Skgland 1c52de9ab1 File-oriented testing
inspired by #2191 but for the `run_top_level_test_with_args`s and  `run_top_level_test_no_args instead of the `load_module_test`s
2023-12-04 22:02:46 +01:00
infogulch 9444e62df9 Resolve lints and format 2023-11-04 02:16:54 -05:00
Mark d96c9e00b7 correct more acyclic_term/1 issues (#2111, #2114), add acyclic_term tests 2023-10-14 18:38:10 -06:00
Mark 0ad4427f83 use eager_stackful_preorder_iter in variable_set, add term_variables/1 tests 2023-10-04 15:12:25 -06:00
Mark 1bfdea7527 rewrite ground_test, add tests for ground/1 (#2075) 2023-10-04 14:17:03 -06:00
bakaq cac52c0537 Run dif tests on cargo test 2023-09-21 12:14:27 -03:00
Mark fa11d6bdd4 remove error printing redundancy and inconsistent state resulting from file_load_cleanup (#1995) 2023-09-05 13:53:57 -06:00
Bennet Bleßmann 13cbff7eab [WIP] fix deadlock in AtomTable::build_with 2023-09-05 19:12:22 +02:00
Skgland b2130c2a48 run cargo fmt 2023-09-05 19:12:17 +02:00