diff options
| author | Paul Chaignon <paul.chaignon@gmail.com> | 2023-10-06 17:43:01 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2023-10-09 10:22:31 +0000 |
| commit | 77f31e1f821f48a72259fdbd9d285d1ce16956f5 (patch) | |
| tree | b05ba6bb8ea808979df3bcf6a03378566290e436 /sys/test | |
| parent | 7236594a2c63f3be360ed0a3feb63b4621530e27 (diff) | |
prog: test optional input resources are skipped
This commit adds a unit test for getInputResources, to verify in
particular that it doesn't return input resources that are optional.
Note we can't test the built-in "optional[]" because that relies on
unions and those aren't supported yet.
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Diffstat (limited to 'sys/test')
| -rw-r--r-- | sys/test/test.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sys/test/test.txt b/sys/test/test.txt index 86be743d1..85e3f4ac8 100644 --- a/sys/test/test.txt +++ b/sys/test/test.txt @@ -866,3 +866,28 @@ syz_r103_r104_s { opt0 r103 (out) opt1 r104 (in) } + +# Optional resources + +resource optional_res1[int32] +resource optional_res2[int32] +resource required_res1[int32] + +test_args2 { + a array[optional_res2] +} + +test_args1 { + a1 ptr64[in, array[optional_res1], opt] + a2 ptr64[in, test_args2, opt] + a3 ptr64[in, required_res1] +} + +test_args0 { + a1 optional_res1 + a2 optional_res2 + a3 required_res1 +} + +test$output_res(arg ptr[out, test_args0]) +test$optional_res(arg ptr[in, test_args1]) |
