Fixes #1111. Expect an error for zero-sized arrays
diff --git a/LibTest/ffi/Array/Array.multi_A02_t01.dart b/LibTest/ffi/Array/Array.multi_A02_t01.dart
index 0e22002..b3a92d4 100644
--- a/LibTest/ffi/Array/Array.multi_A02_t01.dart
+++ b/LibTest/ffi/Array/Array.multi_A02_t01.dart
@@ -16,7 +16,7 @@
/// Do not invoke in normal code.
///
/// @description Checks multidimentional array created by Array.multi(). Check
-/// zero array size
+/// that zero array size is an error
/// @author sgrekhov@unipro.ru
import "dart:ffi";
@@ -24,10 +24,28 @@
class MyStruct extends Struct {
@Array.multi([0, 1])
+//^^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
external Array<Array<Int8>> a0;
@Array(0, 1, 0, 1)
+//^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
external Array<Array<Array<Array<Int8>>>> a1;
+
+ @Array.multi([1, 0])
+//^^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+ external Array<Array<Int8>> a2;
+
+ @Array(1, 1, 0, 1)
+//^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+ external Array<Array<Array<Array<Int8>>>> a3;
}
void main() {
@@ -35,8 +53,9 @@
try {
pointer.ref.a0;
pointer.ref.a1;
+ pointer.ref.a2;
+ pointer.ref.a3;
} finally {
calloc.free(pointer);
}
}
-
diff --git a/LibTest/ffi/Array/Array_A02_t01.dart b/LibTest/ffi/Array/Array_A02_t01.dart
index 0fb0c68..4806d4f 100644
--- a/LibTest/ffi/Array/Array_A02_t01.dart
+++ b/LibTest/ffi/Array/Array_A02_t01.dart
@@ -21,7 +21,7 @@
/// }
/// Do not invoke in normal code.
///
-/// @description Checks that it is allowed to create array with zero size
+/// @description Checks that it is not allowed to create zero-sized array
/// @author sgrekhov@unipro.ru
import "dart:ffi";
@@ -29,6 +29,9 @@
class MyStruct extends Struct {
@Array(0)
+//^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
external Array<Uint8> a0;
}