Commit Graph

8 Commits

Author SHA1 Message Date
Zoltan Somogyi
ecb5e4a9e6 Update the style of many test cases.
tests/declarative_debugger/*.m:
tests/exceptions/*.m:
tests/general/*.m:
tests/grade_subdirs/*.m:
tests/purity/*.m:
tests/submodules/*.m:
tests/typeclasses/*.m:
    Update programming style.

tests/declarative_debugger/*.inp:
    Update line numbers in breakpoint commands.
tests/declarative_debugger/*.exp:
    Update expected line numbers.

tests/exceptions/Mercury.options:
tests/general/Mercury.options:
    Disable some warnings that are irrelevant to the test.
2021-07-25 23:26:17 +10: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
Julien Fischer
b2f25476d0 Fix bug #248: make the argument order of the singleton_set/2 predicates in the
Branches: main, 11.07 (partial)

Fix bug #248: make the argument order of the singleton_set/2 predicates in the
various set modules in the standard library consistent.  (This breaks backwards
compatibility but in a fairly minor way.)

Add the predicate is_singleton/2 to those set modules that do not already
provide it.

Fix a bug in the implementation of set_unordlist.singleton_set/2.

library/set.m:
library/set_bbbtree.m:
library/set_ctree234.m:
library/set_ordlist.m:
library/set_unordlist.m:
	Swap the argument order of singleton_set/2.

	Add is_singleton/2 where it wasn't already present.

library/set_unordlist.m:
	Fix a bug: singleton_set/2 failed to take account of
	the fact that the representation could contain duplicates
	in the singleton_setT::out, set_unordlist(T)::in) mode.
	The fix is to sort and remove the duplicates before checking
	whether the set is singleton.

NEWS:
	Announce the above changes.

library/eqvclass.m:
library/tree234.m:
compiler/accumulator.m:
compiler/code_info.m:
compiler/graph_colour.m:
compiler/higher_order.m:
compiler/lp_rational.m:
compiler/ml_tag_switch.m:
compiler/pd_info.m:
compiler/pd_util.m:
compiler/proc_gen.m:
compiler/prog_mode.m:
compiler/term_pass1.m:
compiler/type_constraints.m:
compiler/unneeded_code.m:
compiler/var_locn.m:
deep_profiler/autopar_costs.m:
deep_profiler/var_use_analysis.m:
tests/general/set_test.m:
	Conform to the above changes.

tests/hard_coded/Mmakefile:
tests/hard_coded/singleton_dups.{m,exp}:
	Add a regression test for the problem with set_unordlist.singleton_set/2.
2012-01-17 15:49:47 +00:00
Julien Fischer
4accd8539d Change the argument order of predicates in the set_bbbtree, set_ordlist, and
Branches: main

Change the argument order of predicates in the set_bbbtree, set_ordlist, and
set_unordlist modules to (1) make them conducive to the use of state variable
notation and (2) make them consistent with the other modules that implement the
set ADT.

This change will break existing code that uses these modules, but such uses
should (and if Mercury and G12 are anything to go by, are) quite rare.

Group function clauses together with the clauses for the corresponding
predicates.

library/set_bbbtree.m:
library/set_ordlist.m:
library/set_unordlist.m:
	As above.

	Reorder the clauses in the set_ordlist module as the existing
	order corresponds in no way to the order of declarations in
	the module interface.

library/set.m:
tests/general/set_test.m:
	Conform to the above changes.

library/dir.m:
	Group predicate and function clauses together.

NEWS:
	Announce the above changes.
2011-05-19 07:33:23 +00:00
Julien Fischer
b9eca3ce6b Change the order of predicate arguments in the array module to make them
Branches: main

Change the order of predicate arguments in the array module to make them
more conducive to the use of state variable notation.

library/array.m:
	As above.

	Group clauses for functions with those of the corresponding
	predicate.

library/svarray.m:
library/hash_table.m:
library/io.m:
library/random.m:
compiler/lambda.m:
deep_profiler/array_util.m:
deep_profiler/callgraph.m:
deep_profiler/canonical.m:
deep_profiler/cliques.m:
deep_profiler/dense_bitset.m:
deep_profiler/measurements.m:
deep_profiler/profile.m:
deep_profiler/read_profile.m:
deep_profiler/startup.m:
tests/general/array_test.m:
tests/general/mode_inf.m:
tests/hard_coded/array_test2.m:
tests/hard_coded/lp.m:
tests/hard_coded/reuse_array.m:
	Conform to the above change and remove dependencies
	on the svarray module.

tests/general/set_test.m:
	Replace calls to set_bbbtree.size/2 with calls to
	set_bbbtree.count/2.

NEWS:
	Announce the above change.
2011-05-06 15:19:34 +00:00
Fergus Henderson
885099a9fd Change the order of the arguments to set_bbbtree__subset,
library/set_bbbtree.m:
	Change the order of the arguments to set_bbbtree__subset,
	to match the order in set.m and elsewhere.

NEWS:
	Document the above change.

tests/general/set_test.m:
	Modify the test case to reflect the above change.
1997-07-08 16:49:14 +00:00
Fergus Henderson
ae23098f04 Update test suite now that bool is a separate module and
Estimated hours taken: 0.5

Update test suite now that bool is a separate module and
`term_*' is now `term__*'.

tests/general/environment.m:
	Import `bool'.  `std_util__bool_not' is now `bool__not'.

tests/general/interpreter.m:
	Replace `term_' with `term__' where appropriate.

tests/general/set_test.m:
	Fix some bugs in the test case.

tests/general/hello_again.m:
	Avoid `incorrect module name' warning.
1996-02-04 03:26:08 +00:00
Tibor Benyi
a61f48836f Regression test file to set_bbbtree.m
Could also be applied to other set modules.
1995-09-01 06:39:15 +00:00