diff options
| author | 2026-10-15 10:12:55 +0330 | |
|---|---|---|
| committer | 2026-10-15 10:12:55 +0330 | |
| commit | c9e4c809bfd90f226363df1ffa7cb57ce3dfbdee (patch) | |
| tree | f4f49101f00798401cc6f46b6ce5c8c8124cbd39 /tests/drivers/tools_contract_test.py | |
| parent | lsp: borrow errors ranged on the use, with related information for where the ... (diff) | |
mkgenome: on a header mismatch name FTOP/ZFP, print the image's and the map's values, and point at a stale src/runtime/rt.zc or map
Diffstat (limited to 'tests/drivers/tools_contract_test.py')
| -rw-r--r-- | tests/drivers/tools_contract_test.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/drivers/tools_contract_test.py b/tests/drivers/tools_contract_test.py index 6a98678..9323a47 100644 --- a/tests/drivers/tools_contract_test.py +++ b/tests/drivers/tools_contract_test.py @@ -28,9 +28,12 @@ if args.group == 'image': changed = words[:]; changed[index] ^= 2 r = command(['build/bin/mkgenome'], pack(changed)) assert r.returncode != 0 and b'not a genome' in r.stderr and not r.stdout + # the header words are named, with both values, and a layout mismatch points at rt.zc and the map + assert [b'FTOP', b'ZFP', b'third word'][index] in r.stderr, r.stderr + if index < 2: assert b'the map has 0x' in r.stderr and b'src/runtime/rt.zc' in r.stderr and b'make clean' in r.stderr, r.stderr r = command(['build/bin/mkgenome'], b'zc: line 1: something is wrong\nzc: 1 error\n') assert r.returncode != 0 and b'something is wrong' in r.stderr and not r.stdout - print('ok mkgenome roundtrip, truncation, alignment, map-header mutation and diagnostic contracts') + print('ok mkgenome roundtrip, truncation, alignment, map-header mutation (naming FTOP, ZFP and both values) and diagnostic contracts') elif args.group == 'map': for preset in ['default', 'small', 'run', 'lsp', 'fixed']: with tempfile.TemporaryDirectory(prefix='tinyvm preset ') as directory: |
