mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 18:03:36 +00:00
tests/hard_coded/write.m:
tests/hard_coded/write.exp*:
As above.
Also, update the expected outputs for the non-C grades for the chnage in
commit 253378f.
60 lines
766 B
Plaintext
60 lines
766 B
Plaintext
var("X") + int(3) * var("X^2") ; (type)
|
|
{ type }
|
|
{ '?-' }
|
|
'?-'
|
|
{ blah }
|
|
blah ; (type), (type) * blah ; (type)
|
|
((blah ; blah), blah) * blah ; blah
|
|
(type) * blah ; (type)
|
|
TESTING DISCRIMINATED UNIONS
|
|
one
|
|
two
|
|
three
|
|
apple([9, 5, 1])
|
|
banana([three, one, two])
|
|
zop(3.3, 2.03)
|
|
zip(3, 2)
|
|
zap(3, -2.111)
|
|
wombat
|
|
foo
|
|
|
|
TESTING POLYMORPHISM
|
|
poly_one([2399.3])
|
|
poly_two(3)
|
|
poly_three(3.33, 4, poly_one(9.11))
|
|
|
|
TESTING BUILTINS
|
|
""
|
|
"Hello, world\n"
|
|
"Foo%sFoo"
|
|
"\""
|
|
'a'
|
|
'&'
|
|
3.14159
|
|
1.128324983E-21
|
|
2.23954899E+23
|
|
-65
|
|
4
|
|
651u
|
|
-128i8
|
|
127i8
|
|
255u8
|
|
-32768i16
|
|
32767i16
|
|
65535u16
|
|
-2147483648i32
|
|
2147483647i32
|
|
4294967295u32
|
|
univ_cons(["hi! I\'m a univ!"])
|
|
'<<predicate>>'
|
|
|
|
TESTING OTHER TYPES
|
|
var(1)
|
|
var_supply(0)
|
|
var_supply(1)
|
|
empty
|
|
qwerty(4)
|
|
array([1, 2, 3, 4])
|
|
version_array([1, 2, 3, 4])
|
|
|