[ddc] Port library show/hide hot reload tests
Change-Id: Iaa7ef742f1204c73e96738cdba774f1263b32797 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405061 Commit-Queue: Nicholas Shahan <nshahan@google.com> Reviewed-by: Nate Biggs <natebiggs@google.com> Reviewed-by: Mark Zhou <markzipan@google.com>
This commit is contained in:
committed by
Commit Queue
parent
1a486499bf
commit
5ec1002eff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"expectedErrors": {
|
||||
"1": "Error: Method not found: 'importedFunc'."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// Copyright (c) 2025, 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.
|
||||
|
||||
importedFunc() => 'a';
|
||||
@@ -0,0 +1,9 @@
|
||||
// Copyright (c) 2025, 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.
|
||||
|
||||
importedFunc() => 'a';
|
||||
|
||||
/** DIFF **/
|
||||
/*
|
||||
*/
|
||||
@@ -0,0 +1,9 @@
|
||||
// Copyright (c) 2025, 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.
|
||||
|
||||
importedFunc() => 'a';
|
||||
|
||||
/** DIFF **/
|
||||
/*
|
||||
*/
|
||||
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) 2025, 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 'package:expect/expect.dart';
|
||||
import 'package:reload_test/reload_test_utils.dart';
|
||||
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1123
|
||||
|
||||
void helper() {}
|
||||
|
||||
Future<void> main() async {
|
||||
helper();
|
||||
await hotReload(expectRejection: true);
|
||||
helper();
|
||||
await hotReload();
|
||||
helper();
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// Copyright (c) 2025, 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 'package:expect/expect.dart';
|
||||
import 'package:reload_test/reload_test_utils.dart';
|
||||
|
||||
import 'lib1.dart' hide importedFunc;
|
||||
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1123
|
||||
|
||||
void helper() {
|
||||
Expect.equals('a', importedFunc());
|
||||
}
|
||||
|
||||
Future<void> main() async {
|
||||
helper();
|
||||
await hotReload(expectRejection: true);
|
||||
helper();
|
||||
await hotReload();
|
||||
helper();
|
||||
}
|
||||
|
||||
/** DIFF **/
|
||||
/*
|
||||
@@ -5,10 +5,14 @@
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:reload_test/reload_test_utils.dart';
|
||||
|
||||
+import 'lib1.dart' hide importedFunc;
|
||||
+
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1123
|
||||
|
||||
-void helper() {}
|
||||
+void helper() {
|
||||
+ Expect.equals('a', importedFunc());
|
||||
+}
|
||||
|
||||
Future<void> main() async {
|
||||
helper();
|
||||
*/
|
||||
@@ -0,0 +1,36 @@
|
||||
// Copyright (c) 2025, 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 'package:expect/expect.dart';
|
||||
import 'package:reload_test/reload_test_utils.dart';
|
||||
|
||||
import 'lib1.dart';
|
||||
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1123
|
||||
|
||||
void helper() {
|
||||
Expect.equals('a', importedFunc());
|
||||
}
|
||||
|
||||
Future<void> main() async {
|
||||
helper();
|
||||
await hotReload(expectRejection: true);
|
||||
helper();
|
||||
await hotReload();
|
||||
helper();
|
||||
}
|
||||
|
||||
/** DIFF **/
|
||||
/*
|
||||
@@ -5,7 +5,7 @@
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:reload_test/reload_test_utils.dart';
|
||||
|
||||
-import 'lib1.dart' hide importedFunc;
|
||||
+import 'lib1.dart';
|
||||
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1123
|
||||
*/
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"expectedErrors": {
|
||||
"1": "Error: Method not found: 'importedFunc'.",
|
||||
"2": "Error: Method not found: 'importedIntFunc'."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// Copyright (c) 2025, 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.
|
||||
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1153
|
||||
|
||||
importedFunc() => 'a';
|
||||
importedIntFunc() => 4;
|
||||
@@ -0,0 +1,13 @@
|
||||
// Copyright (c) 2025, 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.
|
||||
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1153
|
||||
|
||||
importedFunc() => 'a';
|
||||
importedIntFunc() => 4;
|
||||
|
||||
/** DIFF **/
|
||||
/*
|
||||
*/
|
||||
@@ -0,0 +1,13 @@
|
||||
// Copyright (c) 2025, 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.
|
||||
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1153
|
||||
|
||||
importedFunc() => 'a';
|
||||
importedIntFunc() => 4;
|
||||
|
||||
/** DIFF **/
|
||||
/*
|
||||
*/
|
||||
@@ -0,0 +1,13 @@
|
||||
// Copyright (c) 2025, 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.
|
||||
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1153
|
||||
|
||||
importedFunc() => 'a';
|
||||
importedIntFunc() => 4;
|
||||
|
||||
/** DIFF **/
|
||||
/*
|
||||
*/
|
||||
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) 2025, 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 'package:expect/expect.dart';
|
||||
import 'package:reload_test/reload_test_utils.dart';
|
||||
|
||||
import 'lib1.dart' show importedIntFunc;
|
||||
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1153
|
||||
|
||||
void helper() {
|
||||
Expect.equals(4, importedIntFunc());
|
||||
}
|
||||
|
||||
Future<void> main() async {
|
||||
helper();
|
||||
await hotReload(expectRejection: true);
|
||||
helper();
|
||||
await hotReload(expectRejection: true);
|
||||
helper();
|
||||
await hotReload();
|
||||
helper();
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// Copyright (c) 2025, 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 'package:expect/expect.dart';
|
||||
import 'package:reload_test/reload_test_utils.dart';
|
||||
|
||||
import 'lib1.dart' show importedIntFunc;
|
||||
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1153
|
||||
|
||||
void helper() {
|
||||
Expect.equals(4, importedFunc());
|
||||
}
|
||||
|
||||
Future<void> main() async {
|
||||
helper();
|
||||
await hotReload(expectRejection: true);
|
||||
helper();
|
||||
await hotReload(expectRejection: true);
|
||||
helper();
|
||||
await hotReload();
|
||||
helper();
|
||||
}
|
||||
|
||||
/** DIFF **/
|
||||
/*
|
||||
@@ -11,7 +11,7 @@
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1153
|
||||
|
||||
void helper() {
|
||||
- Expect.equals(4, importedIntFunc());
|
||||
+ Expect.equals(4, importedFunc());
|
||||
}
|
||||
|
||||
Future<void> main() async {
|
||||
*/
|
||||
@@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2025, 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 'package:expect/expect.dart';
|
||||
import 'package:reload_test/reload_test_utils.dart';
|
||||
|
||||
import 'lib1.dart' show importedFunc;
|
||||
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1153
|
||||
|
||||
void helper() {
|
||||
Expect.equals(4, importedIntFunc());
|
||||
}
|
||||
|
||||
Future<void> main() async {
|
||||
helper();
|
||||
await hotReload(expectRejection: true);
|
||||
helper();
|
||||
await hotReload(expectRejection: true);
|
||||
helper();
|
||||
await hotReload();
|
||||
helper();
|
||||
}
|
||||
|
||||
/** DIFF **/
|
||||
/*
|
||||
@@ -5,13 +5,13 @@
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:reload_test/reload_test_utils.dart';
|
||||
|
||||
-import 'lib1.dart' show importedIntFunc;
|
||||
+import 'lib1.dart' show importedFunc;
|
||||
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1153
|
||||
|
||||
void helper() {
|
||||
- Expect.equals(4, importedFunc());
|
||||
+ Expect.equals(4, importedIntFunc());
|
||||
}
|
||||
|
||||
Future<void> main() async {
|
||||
*/
|
||||
@@ -0,0 +1,38 @@
|
||||
// Copyright (c) 2025, 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 'package:expect/expect.dart';
|
||||
import 'package:reload_test/reload_test_utils.dart';
|
||||
|
||||
import 'lib1.dart' show importedFunc;
|
||||
|
||||
// Adapted from:
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1153
|
||||
|
||||
void helper() {
|
||||
Expect.equals('a', importedFunc());
|
||||
}
|
||||
|
||||
Future<void> main() async {
|
||||
helper();
|
||||
await hotReload(expectRejection: true);
|
||||
helper();
|
||||
await hotReload(expectRejection: true);
|
||||
helper();
|
||||
await hotReload();
|
||||
helper();
|
||||
}
|
||||
|
||||
/** DIFF **/
|
||||
/*
|
||||
@@ -11,7 +11,7 @@
|
||||
// https://github.com/dart-lang/sdk/blob/9f465e5b6eab0dc3af96140189d4f0190e0ff925/runtime/vm/isolate_reload_test.cc#L1153
|
||||
|
||||
void helper() {
|
||||
- Expect.equals(4, importedIntFunc());
|
||||
+ Expect.equals('a', importedFunc());
|
||||
}
|
||||
|
||||
Future<void> main() async {
|
||||
*/
|
||||
Reference in New Issue
Block a user