uCBQN/test/ffi/test.expected
2022-10-08 19:08:20 +03:00

116 lines
3.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@
# "a"
⟨ 0 1 2 3 4 5 6 ⟩
⟨ 0 10 20 30 40 50 60 70 80 90 ⟩
120168 120168 0.200000000000000011 0.200000000000000011
'𝕩'
2415
⟨ ⟨⟩ ⟨ 0 ⟩ ⟨ 0 1 ⟩ ⟨ 2 1 0 ⟩ ⟨ 0 1 2 3 ⟩ ⟩
⟨ 0 1 2 3 4 ⟩
2‿1‿3⥊1‿2‿3‿4‿5‿6
2‿1‿3⥊1‿2‿3‿4‿500‿¯600
2‿1‿3⥊1‿2‿3‿4‿500000000‿¯600000000
2‿1‿3⥊1‿2‿3‿4‿5.25‿6.9765625
2‿1‿3⥊"012345"
2‿1‿3⥊"01234⍉"
2‿1‿3⥊"01234𝕩"
2‿2⥊⟨'𝕩',2‿1⥊"01","01",<'0'⟩
3‿1‿4‿1‿5‿9‿7
3‿1‿4‿1‿5‿9‿7
3‿1‿4‿1‿5‿9‿7
3‿1‿4‿1‿5‿9‿7
"abcABC;"
"abcABC;"
"abcABC;"
"{𝕨+𝕩}"
⟨ "foo" "foo" "foo" ⟩
165029893
127
# namespaces
⟨ 1 2 ⟩
"default"
# print args
args: -123 -12323 -212312312 250 50000 3123456789 3.141592741012573242 0.333333333333333315
@
@
args: -123 -12323 -212312312 250 50000 3123456789 3.141592741012573242 0.333333333333333315
@
args: -123 -12323 -212312312 250 50000 3123456789 3.141592741012573242 0.333333333333333315
⟨ ⟨ ¯123 ⟩ ⟨ ¯12323 ⟩ ⟨ ¯212312312 ⟩ ⟨ 250 ⟩ ⟨ 50000 ⟩ ⟨ 3123456789 ⟩ ⟨ 3.141592741012573 ⟩ ⟨ 0.3333333333333333 ⟩ ⟩
726f776f6c6c6568 6161616161616161 3837363534333231 7478657474786574
12345678
ff7fdfefefdf7bb4 ff7fdfefefdf7bb4 fefffdfff7ffbffb bffff7fffdfffeff
12345678
# read pointers
⟨ 9 8 7 6 5 4 3 2 1 0 ⟩
10
120
55
# mutate i32*
⟨ ⟨ 2000000001 2100000001 2200000001 2300000001 2400000001 2500000001 2600000001 2700000001 2800000001 2900000001 ⟩ ⟩
⟨ 0 1 1 0 1 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 1 1 0 1 1 1 1 1 1 0 0 1 1 0 0 1 0 0 1 0 0 ⟩
"iellpworld"
"iellpworld"
"iellpworld"
"iellpworld"
"iellpworld"
"iellpworld"
"iellpworld"
⟨ "iellpworld" ⟩
"iellpworld"
# mutate i32*, i16*, i8*
10 20 30
⟨ ⟨ 11 ⟩ ⟨ 21 ⟩ ⟨ 31 ⟩ ⟩
10 20 30
⟨ ⟨ 11 ⟩ ⟨ 21 ⟩ ⟨ 31 ⟩ ⟩
10 20 30
⟨ ⟨ 11 ⟩ ⟨ 21 ⟩ ⟨ 31 ⟩ ⟩
# u64 tests
51539608786
4503599628419072
⟨ ¯2045800064 28744 ⟩
⟨ 0 0 0 1 0 1 1 0 1 0 1 0 0 1 1 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 0 ⟩
# malloc test
⟨ "fff7: refc:2 type:26=i32arr alloc:128" 2 ⟩
# pick item
"hellowor"
"hellowor"
"11122100"
"abacabad"
6618611909121
# structs
¯30000
⟨ 201 2000000001 ¯29999 ⟨ 2 2 3 4 ⟩ 4.25 ⟩
201 2000000001 -29999 4000300020002 4.25
202 2000000002 -29998 5000400030003 5.25
203 2000000003 -29997 5000400030004 6.25
204 2000000004 -29996 7000600050005 7.25
205 2000000005 -29995 8000700060006 8.25
206 2000000006 -29994 8000700060007 9.25
207 2000000007 -29993 a000900080008 10.25
208 2000000008 -29992 b000a00090009 11.25
209 2000000009 -29991 b000a0009000a 12.25
┌─
· ⟨ 201 2000000001 ¯29999 ⟨ 2 2 3 4 ⟩ 4.25 ⟩ ⟨ 203 2000000003 ¯29997 ⟨ 4 3 4 5 ⟩ 6.25 ⟩
┌─
· ⟨ 204 2000000004 ¯29996 ⟨ 5 5 6 7 ⟩ 7.25 ⟩ ⟨ 206 2000000006 ¯29994 ⟨ 7 6 7 8 ⟩ 9.25 ⟩
┌─
· ⟨ 207 2000000007 ¯29993 ⟨ 8 8 9 10 ⟩ 10.25 ⟩ ⟨ 209 2000000009 ¯29991 ⟨ 10 9 10 11 ⟩ 12.25 ⟩
# self-ffi
text
'𝕩'