Commit Graph

6 Commits

Author SHA1 Message Date
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
06e57d3bb4 Make string/1 handle version_arrays in the same way as io.write/3 etc.
library/string.m:
	As above.
NEWS:
	Add a section for 14.01.1 news.

	Mention the above change.

tests/hard_coded/string_string.{m,exp}:
	Extend this test case to cover arrays and version arrays.
2014-03-04 01:48:44 +11:00
Julien Fischer
459847a064 Move the univ, maybe, pair and unit types from std_util into their own
Estimated hours taken: 18
Branches: main

Move the univ, maybe, pair and unit types from std_util into their own
modules.  std_util still contains the general purpose higher-order programming
constructs.

library/std_util.m:
	Move univ, maybe, pair and unit (plus any other related types
	and procedures) into their own modules.

library/maybe.m:
	New module.  This contains the maybe and maybe_error types and
	the associated procedures.

library/pair.m:
	New module.  This contains the pair type and associated procedures.

library/unit.m:
	New module. This contains the types unit/0 and unit/1.

library/univ.m:
	New module. This contains the univ type and associated procedures.

library/library.m:
	Add the new modules.

library/private_builtin.m:
	Update the declaration of the type_ctor_info struct for univ.

runtime/mercury.h:
	Update the declaration for the type_ctor_info struct for univ.

runtime/mercury_mcpp.h:
runtime/mercury_hlc_types.h:
	Update the definition of MR_Univ.

runtime/mercury_init.h:
	Fix a comment: ML_type_name is now exported from type_desc.m.

compiler/mlds_to_il.m:
	Update the the name of the module that defines univs (which are
	handled specially by the il code generator.)

library/*.m:
compiler/*.m:
browser/*.m:
mdbcomp/*.m:
profiler/*.m:
deep_profiler/*.m:
	Conform to the above changes.  Import the new modules where they
	are needed; don't import std_util where it isn't needed.

	Fix formatting in lots of modules.  Delete duplicate module
	imports.

tests/*:
	Update the test suite to confrom to the above changes.
2006-03-29 08:09:58 +00:00
Ralph Becket
03ba699c40 Fix a bug in string.string reported by Peter Ross.
Estimated hours taken: 1
Branches: main, release

Fix a bug in string.string reported by Peter Ross.

library/string.m:
	Bugfix: previously string.value_to_revstrings was not calling
	univ_value on arguments of functors that are handled specially.  This
	caused spurious "univ_cons" functors to appear in the string
	representations of some terms.

test/hard_coded/string_string.exp:
test/hard_coded/string_string.m:
	Extended the test case for string.string to cover Peter's example.
2005-08-04 04:45:19 +00:00
Ian MacLarty
f5d0e83e8b Make string.string/1 format lists properly.
Estimated hours taken: 0.2
Branches: main

Make string.string/1 format lists properly.  Previously it used to
put univ_cons around each tail element.

library/string.m
	The arguments returned from deconstruct are univs, so make
	list_tail_to_revstrings expect a univ and rename to
	univ_list_tail_to_revstrings.

tests/hard_coded/string_string.exp
tests/hard_coded/string_string.m
	Test conversion of lists to strings.
2004-12-20 14:22:54 +00:00
Ralph Becket
fea6e9a1c1 Fix an infinite loop bug in string.string.
Estimated hours taken: 4
Branches: main

Fix an infinite loop bug in string.string.

library/string.m:
	Fixed a bug where string.string would go into an infinite loop when
	trying to format the argument values of terms.

tests/hard_coded/Mmakefile:
tests/hard_coded/string_string.m:
tests/hard_coded/string_string.exp:
	Added a test case.
2004-10-05 05:49:01 +00:00