From f819d6f7cb99737851dcaaa51f11190138fd48d5 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sun, 19 Nov 2023 23:53:28 +0100 Subject: compiler/testdata: add missing error cases This commit adds error cases that weren't covered before. They were identified by looking at the coverage numbers for pkg/compiler. Signed-off-by: Paul Chaignon --- pkg/compiler/testdata/errors.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkg/compiler/testdata/errors.txt') diff --git a/pkg/compiler/testdata/errors.txt b/pkg/compiler/testdata/errors.txt index 84cfad221..64a54877b 100644 --- a/pkg/compiler/testdata/errors.txt +++ b/pkg/compiler/testdata/errors.txt @@ -139,6 +139,7 @@ foo$70() ("foo") ### unexpected string "foo", expect attribute foo$71() (42) ### unexpected int 42, expect attribute foo$72() (disabled, disabled) ### duplicate syscall foo$72 attribute disabled foo$73(a int32[int_flags, 2]) ### align argument of int32 is not supported unless first argument is a range +foo$74() (int8:1) ### unexpected ':' opt { ### struct uses reserved name opt f1 int32 @@ -167,6 +168,7 @@ s3 { f7 int32:33 ### bitfield of size 33 is too large for base type of size 32 f8 const[0, int32:C1] ### literal const bitfield sizes are not supported f9 const[0] ### wrong number of arguments for type const, expect value, base type + f10 int8:1:1 ### unexpected ':' } [packed, align[4]] s5 { @@ -201,6 +203,10 @@ s13 { f1 int8 } [size[0[0]]] ### size attribute has colon or args +s14 { + f1 int8 +} [size[1, 2]] ### size attribute is expected to have 1 argument + u3 [ f1 int8 f2 int32 -- cgit mrf-deployment