Commit Graph

12 Commits

Author SHA1 Message Date
Peter Wang
88047bbb45 Delete Erlang from tests.
tests/general/float_test.exp3:
tests/general/float_test.m:
tests/general/read_dir_regression.exp4:
tests/general/read_dir_regression.m:
tests/hard_coded/remove_file.exp2:
tests/hard_coded/remove_file.m:
    Delete Erlang backend specific expected outputs.

tests/hard_coded/Mmakefile:
tests/hard_coded/erlang_deconstruct.exp:
tests/hard_coded/erlang_deconstruct.m:
tests/hard_coded/existential_list.exp:
tests/hard_coded/existential_list.m:
tests/valid/Mmakefile:
tests/valid/erl_ite_vars.m:
tests/valid/zf_erlang_bug.m:
    Delete erlang target specific tests.

tests/*:
    Delete Erlang foreign procs and foreign types.
2020-10-27 11:10:11 +11:00
Julien Fischer
ada4e79bdc Document how "next integer" operations handle infinite values.
Fix a test case failure in spf grades.

library/math.m:
     Document how the "next integer" operations handle arguments of infinite
     magnitude.

tests/general/float_test.m:
    s/ceil/ceiling/ in a spot.

    Test next integer operations with +/-infinity (and zero).

    In the erlang grades, avoid running parts of these tests that
    rely on library functionality that is NYI.

    Document what the expected outputs correspond to.

tests/general/float_test.exp:
    Update this expected output.

tests/general/float_test.exp2:
    Replace the contents of this file: previously it contained output for
    some ancient version of MSVC; it now contains the spf version of the
    output.

tests/general/float_test.exp3:
    A new expected output for the erlang grades.
2018-09-05 02:19:01 +00:00
Julien Fischer
3848d58571 Update syntax in a test case.
tests/general/float_test.m:
    As above; the actual test has not changed (yet).
2018-09-04 06:15:49 +00:00
Zoltan Somogyi
33eb3028f5 Clean up the tests in half the test directories.
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.
2015-02-14 20:14:03 +11:00
Fergus Henderson
a5bf6d3fc9 Uncomment some parts of this test which had previously
Estimated hours taken: 0.5
Branches: main

tests/general/float_test.m:
tests/general/float_test.exp:
	Uncomment some parts of this test which had previously
	been commented out because they didn't work with NU-Prolog.
2002-03-06 03:50:31 +00:00
Zoltan Somogyi
66d7c9bc39 Remove obsolete predicates whose jobs are now done by functions.
Estimated hours taken: 1
Branches: main

library/float.m:
library/math.m:
	Remove obsolete predicates whose jobs are now done by functions.
	The existence of the predicate versions made uses of the functions
	ambiguous, as (e.g.) X = math__sin(Y) could be read both as a function
	application and as the creation of a closure.

	The removed predicates were marked obsolete in March 1999, so there has
	been ample notice.

tests/general/float_test.m:
tests/valid/vn_float.m:
	Replace the predicate forms with the function forms.
2002-01-04 07:49:14 +00:00
Simon Taylor
34c6b77b3c Generate exceptions rather than program aborts for domain errors
Estimated hours taken: 6
Branches: main

Generate exceptions rather than program aborts for domain errors
and out of bounds array accesses.

Improve the handling of the arithmetic functions.

library/float.m:
library/int.m:
compiler/builtin_ops.m:
	Handle division by zero with an exception rather than a
	program abort.

	Add int__unchecked_quotient and float__unchecked_quotient,
	which don't check for division by zero.

	Remove reverse modes of the arithmetic functions in float.m.
	Richard O'Keefe pointed out a while ago that they don't work
	because of rounding errors.

	Remove the long obsolete `int__builtin_*' and
	`float__builtin_float_*' predicates.

library/math.m:
library/array.m:
	Generate exceptions rather than program aborts.
	The bounds and domain checks are now implemented in
	Mercury, so they do not need to be duplicated for each
	target language.

library/exception.m:
	Remove predicate throw_string/1, which was used to throw
	exceptions from array.m across the C interface, which would
	not work in LLDS grades.

NEWS:
	Document the changes.

tests/general/float_test.m:
tests/general/string_format_test.m:
tests/hard_coded/ho_solns.m:
tests/hard_coded/ho_univ_to_type.m:
tests/hard_coded/qual_strang.m:
tests/hard_coded/qual_strung.m:
	Rename occurrences of `builtin_*'.
2001-09-02 12:20:14 +00:00
Fergus Henderson
cf96bf4ccd Add a new test `liveness.m' (which at the moment we do not yet
Estimated hours taken: 0.5

tests/general:
	Add a new test `liveness.m' (which at the moment we do not yet
	pass, so the test is not enabled in the Mmake file yet).

	Fix the `float_test.m' test so that it uses `%6.3g' rather
	than `%6.3f', so that it doesn't complain if the value of
	float__max is different in the 16th significant figure.
	Also comment out the bits which test math__pi and math__e,
	since they are not implemented for NU-Prolog.
1996-11-24 14:30:23 +00:00
Fergus Henderson
d31e229dd0 Use string__format to print only the first three digits of
float_test.m:
	Use string__format to print only the first three digits of
	floating point constants, so that rounding errors don't
	cause problems when comparing the output from the Mercury
	version and the NU-Prolog version.

	Also, comment out the parts of the test that don't yet work
	because math_rt.mod has no NU-Prolog equivalent.
1995-10-03 16:50:36 +00:00
Andrew Bromage
e69f30603f Added some more float tests to test out math.m 1995-09-04 05:11:36 +00:00
Fergus Henderson
bc07fec168 Add some brief comments describing what each test case tests.
tests/general/*.m:
	Add some brief comments describing what each test case tests.
1995-08-17 05:32:34 +00:00
Fergus Henderson
18a7e00ad7 Rename *.nl to *.m.
tests/general:
	Rename *.nl to *.m.
	Add new test `string_test_2.m'.
1995-04-22 16:59:55 +00:00