mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 21:10:22 +00:00
6357371c0a
Change-Id: Icf7135ae46159ca834a54849c72405eec83f9b4f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364384 Reviewed-by: Nicholas Shahan <nshahan@google.com> Commit-Queue: Mark Zhou <markzipan@google.com>
42 lines
1,008 B
Dart
42 lines
1,008 B
Dart
import 'package:expect/expect.dart';
|
|
import 'package:reload_test/reload_test_utils.dart';
|
|
|
|
import 'dart:math';
|
|
import 'dart:convert';
|
|
|
|
void validate() {
|
|
// Symbols in 'dart:convert' are visible after hot reload.
|
|
Expect.equals(1, hotReloadGeneration);
|
|
Expect.equals(e, 2.718281828459045);
|
|
Expect.type<double>(e);
|
|
Expect.type<Codec>(utf8);
|
|
Expect.type<Function>(jsonEncode);
|
|
}
|
|
|
|
Future<void> main() async {
|
|
validate();
|
|
await hotReload();
|
|
validate();
|
|
}
|
|
/** DIFF **/
|
|
/*
|
|
@@ -2,12 +2,15 @@
|
|
import 'package:reload_test/reload_test_utils.dart';
|
|
|
|
import 'dart:math';
|
|
+import 'dart:convert';
|
|
|
|
void validate() {
|
|
- // Initial program is valid. Symbols in 'dart:math' are visible.
|
|
- Expect.equals(0, hotReloadGeneration);
|
|
+ // Symbols in 'dart:convert' are visible after hot reload.
|
|
+ Expect.equals(1, hotReloadGeneration);
|
|
Expect.equals(e, 2.718281828459045);
|
|
Expect.type<double>(e);
|
|
+ Expect.type<Codec>(utf8);
|
|
+ Expect.type<Function>(jsonEncode);
|
|
}
|
|
|
|
Future<void> main() async {
|
|
*/
|