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.
Branches: main
library/io.m:
Document the effect of io.putback_byte on the stream position, based
on the behaviour of ungetc().
Document the effect of io.seek_binary_input on the pushback buffer.
Implement io.read_line_as_string and io.read_file_as_string
efficiently for Java.
Make the globals ML_next_stream_id and MR_io_exception in Java
thread-safe.
Make the type of ML_io_stream_db more specific in Java.
Use the FileChannel class unconditionally. We no longer support
Java < 1.5 so we don't need to use reflection to access that class at
runtime.
Throw Mercury-catchable exceptions on Java I/O errors.
Add class qualification or `may_not_duplicate' attributes on
foreign_procs to prevent problems with intermodule optimisation.
tests/hard_coded/Mmakefile:
tests/hard_coded/stream_putback.data:
tests/hard_coded/stream_putback.exp:
tests/hard_coded/stream_putback.m:
tests/hard_coded/stream_putback_binary.exp:
tests/hard_coded/stream_putback_binary.m:
Add test cases for io.putback_char, io.putback_byte and seeking.