Skip to content

Commit

Permalink
#993. More Struct tests added
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrekhov committed Feb 26, 2021
1 parent 3e7185e commit 975a228
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
23 changes: 23 additions & 0 deletions LibTest/ffi/Struct/Struct_A06_t01.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
/**
* @assertion Struct subclasses cannot be empty
*
* @description Checks that it is a compile error if Struct subclass is empty
* @author sgrekhov@unipro.ru
* @issue 44935
*/
import "dart:ffi";

class S1 extends Struct {
//^^^^^^^^^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

void main() {
S1? s1;
}
23 changes: 23 additions & 0 deletions LibTest/ffi/Struct/Struct_A07_t01.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
/**
* @assertion Struct cannot be implemented or used as a mixin
*
* @description Checks that it is a compile error if Struct is implemented
* @author sgrekhov@unipro.ru
* @issue 44935
*/
import "dart:ffi";

class S1 implements Struct {
// ^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

void main() {
S1? s1;
}
23 changes: 23 additions & 0 deletions LibTest/ffi/Struct/Struct_A07_t02.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
/**
* @assertion Struct cannot be implemented or used as a mixin
*
* @description Checks that it is a compile error if Struct is used as a mixin
* @author sgrekhov@unipro.ru
* @issue 44935
*/
import "dart:ffi";

class S1 extends Object with Struct {
// ^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

void main() {
S1? s1;
}

0 comments on commit 975a228

Please sign in to comment.