tests/hard_coded/*.m:
Rename modules as mentioned above.
In a few cases, where the main module's name itself had a suffix,
such as "_mod_a" or "_main", remove that suffix. This entails
renaming the .exp file as well. (In some cases, this meant that
the name of a helper module was "taken over" by the main module
of the test case.)
Update all references to the moved modules.
General updates to programming style, such as
- replacing DCG notation with state var notation
- replacing (C->T;E) with (if C then T else E)
- moving pred/func declarations to just before their code
- replacing io.write/io.nl sequences with io.write_line
- replacing io.print/io.nl sequences with io.print_line
- fixing too-long lines
- fixing grammar errors in comments
tests/hard_coded/Mmakefile:
tests/hard_coded/Mercury.options:
Update all references to the moved modules.
Enable the constant_prop_int test case. The fact that it wasn't enabled
before is probably an accident. (When constant_prop_int.m was created,
the test case was added to a list in the Mmakefile, but that list
was later removed due to never being referenced.)
tests/hard_coded/constant_prop_int.{m,exp}:
Delete the calls to shift operations with negative shift amounts,
since we have added a compile-time error for these since the test
was originally created.
tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
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 debugger tests,
specify the new line numbers in .inp files and expect them in .exp files.
Estimated hours taken: 0.1
Branches: main
Remove deprecated syntax from some test cases.
(This was done on the release branch some time ago.)
tests/*/*.m:
Replace deprecated syntax.
as a module qualifier.
tests/general/commit_bug.m:
tests/general/mode_info_bug.m:
tests/general/partition.m:
tests/hard_coded/string_alignment.m:
Delete `nl' predicate (and replace calls with calls to `io__nl')
to avoid ambiguities with `io__nl'.
tests/general/partition.m:
Rename `write' as `write_s'
to avoid ambiguities with `io__write'.
tests/warnings/singleton_test.m:
tests/warnings/singleton_test.exp:
tests/warnings/pragma_source_code.m:
tests/warnings/pragma_source_code.exp:
s/append/my_append/g
to avoid ambiguities with `list__append'.
tests/general/parse_list.m:
tests/general/semidet_map.m:
s/meta__/meta_/g
to avoid errors about defining `meta__blah' in a module
other than `meta'.
tests/hard_coded/qual_strang.m:
tests/hard_coded/qual_strung.m:
s/string__//g
to avoid errors about defining `string__blah' in a module
other than `string'.
tests/valid/middle_rec_bug.m:
s/garbage_out__/garbage_out_/g
to avoid errors about defining `garbage_out__blah' in a module
other than `garbage_out'.
tests/hard_coded/qual_basic_test.m:
tests/hard_coded/qual_adv_test.m:
Eliminate double quantifiers, e.g. delete the `io__' in
`io:io__write_string'.
Also test calling `write_string' without `io:' or `io__'.
Estimated hours taken: 0.2
tests/hardcoded/qual_basic_test.m
tests/hardcoded/qual_adv_test.m
tests/hardcoded/qual_strang.m
tests/hardcoded/qual_strung.m
Test module qualified function calls and higher-order pred constants.
tests/hard_coded/:
A directory for tests that will not run under NU-prolog. The
expected outcome (`*.exp') files are hand written, and compared
with output from the modules.
qual_*_test.m:
Tests to ensure module qualification of predicates works correctly.
qual_adv_test.m also tests that module names are used correctly to
distinguish between predicates with similar/same names.
qual_*_test.exp:
Expected output of above tests.