From b531ad31dfd413ccc5ed21116a0556f3bd0107ae Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Thu, 9 Nov 2023 17:07:58 +0100 Subject: prog, sys: test cases for struct AUTO This commit adds a few test cases for the support of AUTO for structs. It covers: - A simple struct with only const and len types. - A nested struct case. - An error case when a struct has an int type field. Signed-off-by: Paul Chaignon --- sys/test/test.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sys') diff --git a/sys/test/test.txt b/sys/test/test.txt index fed8d0f47..768b7b584 100644 --- a/sys/test/test.txt +++ b/sys/test/test.txt @@ -811,6 +811,21 @@ auto_struct0 { f2 int32 } +test$auto1(a const[0x42], b ptr[in, auto_struct1], c len[b], d int32) + +auto_struct1 { + f0 len[parent, int32] + f1 const[0x43, int32] + f2 const[0, int32] +} + +test$auto2(a const[0x42], b ptr[in, auto_struct2], c len[b], d int32) + +auto_struct2 { + f0 len[parent, int32] + f1 auto_struct1 +} + # Attributes resource disabled_resource[int32] -- cgit mrf-deployment