Files
sdk/pkg/kernel/test/binary/library_flags_test.dart
T
Jens Johansen 1c3468a646 [kernel] Remove Library.isExternal
Change-Id: I6638b915c1189838e7081069a0075e4ecd9ee9d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125600
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-12-02 09:24:42 +00:00

22 lines
778 B
Dart

// Copyright (c) 2019, 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.
import 'utils.dart';
/// Test that library flags (external, synthetic)
/// are serialized and read correctly.
main() {
Library lib = new Library(Uri.parse("foo://bar.dart"));
lib.isSynthetic = false;
Library lib2 = libRoundTrip(lib);
if (lib2.isSynthetic != false)
throw "Serialized and re-read library had change in synthetic flag.";
lib = new Library(Uri.parse("foo://bar.dart"));
lib.isSynthetic = true;
lib2 = libRoundTrip(lib);
if (lib2.isSynthetic != true)
throw "Serialized and re-read library had change in synthetic flag.";
}