Files
mercury/tests/hard_coded/expand.exp
Fergus Henderson 52767a5481 Update the test cases to reflect recent changes to io__write.
Estimated hours taken: 1

Update the test cases to reflect recent changes to io__write.

test/hard_coded/construct.m:
test/hard_coded/expand.m:
	Use `io__print' rather than `io__write' for univs,
	so that it doesn't output the `univ(... : type)' wrappers.

tests/hard_coded/deep_copy_bug.exp:
tests/hard_coded/construct.exp:
tests/hard_coded/expand.exp:
tests/hard_coded/write.exp:
tests/hard_coded/write_reg1.exp:
	Change the expected output to use proper list notation
	rather than prefix `.', and to properly quote strings and atoms,
	but also to improperly quote equivalences types.

tests/hard_coded/Mmake:
	Add a comment explaining that deep_copy_bug.exp, write.exp, and
	write_reg1.exp are wrong, due to a bug in io__write.
1997-04-28 15:52:30 +00:00

135 lines
2.6 KiB
Plaintext

TESTING DISCRIMINATED UNIONS
one/0
no arguments
expand: functor one arity 0 arguments []
two/0
no arguments
expand: functor two arity 0 arguments []
three/0
no arguments
expand: functor three arity 0 arguments []
apple/1
argument 1 of functor apple was:[9, 5, 1]
expand: functor apple arity 1 arguments [[9, 5, 1]]
banana/1
argument 1 of functor banana was:[three, one, two]
expand: functor banana arity 1 arguments [[three, one, two]]
zop/2
argument 2 of functor zop was:2.03000000000000
expand: functor zop arity 2 arguments [3.30000000000000, 2.03000000000000]
zip/2
argument 2 of functor zip was:2
expand: functor zip arity 2 arguments [3, 2]
zap/2
argument 2 of functor zap was:-2.11100000000000
expand: functor zap arity 2 arguments [3, -2.11100000000000]
wombat/0
no arguments
expand: functor wombat arity 0 arguments []
foo/0
no arguments
expand: functor foo arity 0 arguments []
TESTING POLYMORPHISM
poly_two/1
argument 1 of functor poly_two was:3
expand: functor poly_two arity 1 arguments [3]
poly_three/3
argument 3 of functor poly_three was:poly_one(9.11000000000000)
expand: functor poly_three arity 3 arguments [3.33000000000000, 4, poly_one(9.11000000000000)]
poly_one/1
argument 1 of functor poly_one was:[2399.30000000000]
expand: functor poly_one arity 1 arguments [[2399.30000000000]]
TESTING BUILTINS
""/0
no arguments
expand: functor "" arity 0 arguments []
"Hello, world
"/0
no arguments
expand: functor "Hello, world
" arity 0 arguments []
"Foo%sFoo"/0
no arguments
expand: functor "Foo%sFoo" arity 0 arguments []
"""/0
no arguments
expand: functor """ arity 0 arguments []
'a'/0
no arguments
expand: functor 'a' arity 0 arguments []
'&'/0
no arguments
expand: functor '&' arity 0 arguments []
3.14159000000000/0
no arguments
expand: functor 3.14159000000000 arity 0 arguments []
1.12832498300000e-21/0
no arguments
expand: functor 1.12832498300000e-21 arity 0 arguments []
2.23954899000000e+23/0
no arguments
expand: functor 2.23954899000000e+23 arity 0 arguments []
-65/0
no arguments
expand: functor -65 arity 0 arguments []
4/0
no arguments
expand: functor 4 arity 0 arguments []
./2
argument 2 of functor . was:[]
expand: functor . arity 2 arguments ["hi! I\'m a univ!", []]
<<predicate>>/0
no arguments
expand: functor <<predicate>> arity 0 arguments []
TESTING OTHER TYPES
1/0
no arguments
expand: functor 1 arity 0 arguments []
0/0
no arguments
expand: functor 0 arity 0 arguments []
1/0
no arguments
expand: functor 1 arity 0 arguments []
empty/0
no arguments
expand: functor empty arity 0 arguments []
qwerty/1
argument 1 of functor qwerty was:4
expand: functor qwerty arity 1 arguments [4]