Commit Graph

4 Commits

Author SHA1 Message Date
Zoltan Somogyi
660cfe4f83 s/predicate symbol predicate/predicate symbol/ in a diagnostic.
We used to generate diagnostics of the form

    The predicate symbol predicate `<'/2 is also overloaded here.

The second "predicate" is pure noise. It could never be "function",
even though the code generating that message was prepared for that.

compiler/typecheck.m:
    When typechecking a *predicate* call, don't specify the predicate
    being called using a data structure that can also refer to functions.

compiler/typecheck_info.m:
    When representing an overloaded predicate name, as opposed to
    an overloaded function name, don't include a pred_or_func indication
    that should *always* be pf_predicate.

compiler/typecheck_errors.m:
    When reporting an overloaded predicate name, or talking about a
    predicate's argument vector, do not take a pred_or_func indication,
    since it should *always* be pf_predicate.

tests/invalid/ambiguous_overloading_error.err_exp:
tests/warnings/ambiguous_overloading.exp:
    Don't expect the redundant "predicate" in the overload error message.

tests/invalid/max_error_line_width.err_exp:
tests/invalid/max_error_line_width.m:
    The deletion of the redundant "predicate" in overload error messages
    made them all fit on one line, robbing this test of its task of testing
    longer-than-80-column output lines. Change the test so that the overload
    is not between int.< and float.<, but between the unchecked_left_shift
    functions in int and uint, since the longer function name yields error
    message lines in the length range this test case wants to test.

tests/invalid/ambiguous_overloading_error.m:
tests/invalid/arg_permutation.m:
tests/invalid/assert_in_interface.m:
tests/invalid/bad_detism_category.m:
    Fix programming style.

tests/invalid/assert_in_interface.err_exp:
    Update a line number.
2020-10-26 20:28:18 +11:00
Zoltan Somogyi
fdd141bf77 Clean up the tests in the other test directories.
tests/invalid/*.{m,err_exp}:
tests/misc_tests/*.m:
tests/mmc_make/*.m:
tests/par_conj/*.m:
tests/purity/*.m:
tests/stm/*.m:
tests/string_format/*.m:
tests/structure_reuse/*.m:
tests/submodules/*.m:
tests/tabling/*.m:
tests/term/*.m:
tests/trailing/*.m:
tests/typeclasses/*.m:
tests/valid/*.m:
tests/warnings/*.{m,exp}:
    Make these tests use four-space indentation, and ensure that
    each module is imported on its own line. (I intend to use the latter
    to figure out which subdirectories' tests can be executed in parallel.)

    These changes usually move code to different lines. For the tests
    that check compiler error messages, expect the new line numbers.

browser/cterm.m:
browser/tree234_cc.m:
    Import only one module per line.

tests/hard_coded/boyer.m:
    Fix something I missed.
2015-02-16 12:32:18 +11:00
Peter Ross
7e76fb58cc Change from using :- assertion' to :- promise'.
Estimated hours taken: 1

Change from using `:- assertion' to `:- promise'.

invalid/assert_in_interface.err_exp:
invalid/assert_in_interface.m:
invalid/tricky_assert1.err_exp:
invalid/tricky_assert1.m:
valid/tricky_assert2.m:
    Make the required changes.
1999-11-12 09:31:54 +00:00
Peter Ross
167ac098d7 Tests of assertions which are in the interface section of a module.
Estimated hours taken: 1

Tests of assertions which are in the interface section of a module.

tests/invalid/Mmakefile:
tests/valid/Mmakefile:
    Call the new tests.

tests/invalid/assert_in_interface.m:
tests/invalid/assert_in_interface.err_exp:
   Test that an assertion in the interface detects that one of the
   symbols in the assertion comes from a module imported in the
   implementation.

tests/invalid/tricky_assert1.m:
tests/invalid/tricky_assert1.err_exp:
    Test that `:- external' declarations are handled correctly.

tests/valid/tricky_assert2.m:
    Test that `:- external' declarations are handled correctly.
1999-11-11 23:18:40 +00:00