mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
[test,ddc] Update library test to use static method
The test was relying on the runtime type representation to verify that the library object returned from `getLibrary` was correct. Now it uses the static `print()` method instead to avoid issues in the new type system. Change-Id: Iaa26427e46afd0e7f4ae0a84cb4c123755484647 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335023 Reviewed-by: Sigmund Cherem <sigmund@google.com> Commit-Queue: Nicholas Shahan <nshahan@google.com>
This commit is contained in:
parent
b9e25afcb4
commit
b82465111c
|
@ -27,6 +27,9 @@ void main() {
|
|||
|
||||
// Test getLibrary(...)
|
||||
var core = dart.getLibrary('dart:core');
|
||||
var stackTraceType = dart.wrapType(JS('', '#.StackTrace', core));
|
||||
Expect.equals(StackTrace, stackTraceType);
|
||||
// Using the print method to verify we get the same library object.
|
||||
// The print method is only used here because we know it is a member of the
|
||||
// dart:core library.
|
||||
var printMethod = JS('', '#.print', core);
|
||||
Expect.equals(print, printMethod);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,9 @@ void main() {
|
|||
|
||||
// Test getLibrary(...)
|
||||
var core = dart.getLibrary('dart:core');
|
||||
var stackTraceType = dart.wrapType(JS('', '#.StackTrace', core));
|
||||
Expect.equals(StackTrace, stackTraceType);
|
||||
// Using the print method to verify we get the same library object.
|
||||
// The print method is only used here because we know it is a member of the
|
||||
// dart:core library.
|
||||
var printMethod = JS('', '#.print', core);
|
||||
Expect.equals(print, printMethod);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue