mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-22 12:53:47 +00:00
Estimated hours taken: 30 Add io__write/3 and io__write/4, which writes anything to the current, or specified, output stream. (At fjh's request, these test cases have not yet been enabled). tests/hard_coded/write.m: tests/hard_coded/write.exp: Test for io__write, exercises all data types and representations.
41 lines
531 B
Plaintext
41 lines
531 B
Plaintext
TESTING DISCRIMINATED UNIONS
|
|
one
|
|
two
|
|
three
|
|
apple(.(9, .(5, .(1, []))))
|
|
banana(.(three, .(one, .(two, []))))
|
|
zop(3.30000000000000, 2.03000000000000)
|
|
zip(3, 2)
|
|
zap(3, -2.11100000000000)
|
|
wombat
|
|
foo
|
|
|
|
TESTING POLYMORPHISM
|
|
poly_one(.(2399.30000000000, []))
|
|
poly_two(3)
|
|
poly_three(3.33000000000000, 4, poly_one(9.11000000000000))
|
|
|
|
TESTING BUILTINS
|
|
""
|
|
"Hello, world
|
|
"
|
|
"Foo%sFoo"
|
|
"""
|
|
'a'
|
|
'&'
|
|
3.14159000000000
|
|
1.12832498300000e-21
|
|
2.23954899000000e+23
|
|
-65
|
|
4
|
|
.("hi! I'm a univ!", [])
|
|
<<predicate>>
|
|
|
|
TESTING OTHER TYPES
|
|
1
|
|
0
|
|
1
|
|
empty
|
|
qwerty(4)
|
|
|