aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / native / omega / allen / tests / intent.om
| 1 | text Askcode "Please make me a calculator" |
| 2 | text Askpoem "Write a poem about python" |
| 3 | text Askmore "Now add a square root key" |
| 4 | text Expected "JOB 9 code the person asked Allen for code.\tPlease make me a calculator" |
| 5 | text Nscript "script a poem" |
| 6 | fn main to int |
| 7 | put Inlen 0 len Askcode |
| 8 | for i ulong len Askcode |
| 9 | put In i get Askcode i |
| 10 | end |
| 11 | check eq classify 2 501 |
| 12 | b = jobbuild 2 9 |
| 13 | same = eq get Outlen 0 len Expected |
| 14 | for i ulong len Expected |
| 15 | if ne get Outb i get Expected i |
| 16 | same = false |
| 17 | end |
| 18 | end |
| 19 | check b 502 |
| 20 | check same 503 |
| 21 | put Inlen 0 len Askpoem |
| 22 | for i ulong len Askpoem |
| 23 | put In i get Askpoem i |
| 24 | end |
| 25 | check eq classify 1 504 |
| 26 | check eq jobwant 1 505 |
| 27 | put Inlen 0 len Askmore |
| 28 | for i ulong len Askmore |
| 29 | put In i get Askmore i |
| 30 | end |
| 31 | check eq classify 1 506 |
| 32 | put R 6 1 |
| 33 | check eq classify 3 507 |
| 34 | put R 6 0 |
| 35 | put Inlen 0 len Nscript |
| 36 | for i ulong len Nscript |
| 37 | put In i get Nscript i |
| 38 | end |
| 39 | check eq classify 1 508 |
| 40 | ret int get Fails 0 |
| 41 | end |