blob: d9cd71399a9bf518133425bce7dc7de8f9ba0389 [file] [log] [blame]
# Copyright (c) 2020, 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.md file.
# The FFI transformation of nested structs has to update both position and size
# of non-changed libraries, so the alternative invalidation has to be disabled.
# This test initializes from dill.
type: newworld
worlds:
- entry: main.dart
experiments: alternative-invalidation-strategy
sources:
main.dart: |
import "dart:ffi";
import 'lib.dart';
class X extends Struct {
external Y x1;
external Y x2;
@Uint8()
external int x3;
}
lib.dart: |
import 'dart:ffi';
class Y extends Struct {
@Uint8()
external int y1;
@Uint8()
external int y2;
@Uint64()
external int y3;
}
expectedLibraryCount: 2
- entry: main.dart
experiments: alternative-invalidation-strategy
expectInitializeFromDill: true
invalidate:
- lib.dart
sources:
main.dart: |
import "dart:ffi";
import 'lib.dart';
class X extends Struct {
external Y x1;
external Y x2;
@Uint8()
external int x3;
}
lib.dart: |
import 'dart:ffi';
class Y extends Struct {
@Uint8()
external int y1;
@Uint64()
external int y3;
@Uint8()
external int y2;
}
expectedLibraryCount: 2
# The FFI transformation have to update the size and position of containers
# (i.e. other structs with this Struct inside), so rebuilding only the
# changed library doesn't work.
expectsRebuildBodiesOnly: false