99cff54882
This CL introduces a test runner and test cases under `pkg/dynamic_modules/test/`. These tests are end-to-end tests that specifically target the dynamic modules semantics. This includes: * semantics expecations on the program evolutions (e.g. libraries defined only once) * individual cases around the dynamic interface (callable, extensible, overrides). We should continue to add more test as we discover coner cases worth validating (e.g. mixins, constants, etc). The suite is not yet integrated to the test matrix, my plan is to do so after we have some initial targets set up. Change-Id: I2a63946c36d99baacb6fb7edc01c4ef377ce20b6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379921 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Sigmund Cherem <sigmund@google.com>
17 lines
550 B
Dart
17 lines
550 B
Dart
// Copyright (c) 2024, 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 '../../common/testing.dart' as helper;
|
|
import 'package:expect/expect.dart';
|
|
|
|
import 'shared/shared.dart' show Base;
|
|
|
|
/// A dynamic module can implement an exposed class.
|
|
main() async {
|
|
final o = (await helper.load('entry1.dart')) as Base;
|
|
Expect.equals(3, o.method1());
|
|
Expect.equals(4, o.method2());
|
|
helper.done();
|
|
}
|