078d407f40
This adds a new expectation test suite which mimics the modular compilation strategy used by dartdevc; the test code is fully compiled but the linked dependencies are only compiled as outlines. Change-Id: I4b8a68087997c025eb39aec414ee1706ddf7f847 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222762 Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
library /*isNonNullableByDefault*/;
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
import "package:expect/expect.dart" as exp;
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
static const field core::Object? var1 = #C1;
|
|
static const field core::Object? var2 = #C2;
|
|
static const field core::Object? var3 = #C3;
|
|
static const field core::Map<core::String, core::int> map = #C9;
|
|
static const field core::Object? var4 = #C2;
|
|
static const field core::Object? var5 = #C6;
|
|
static const field core::Object? var6 = #C8;
|
|
static const field core::int? var7 = #C2;
|
|
static method fn(core::Map<core::Object, core::Object> map, core::Object key) → core::Object? {
|
|
return map.{core::Map::[]}(key){(core::Object?) → core::Object?};
|
|
}
|
|
static method fn2() → core::int? {
|
|
return #C11.{core::Map::[]}("key"){(core::Object?) → core::int?};
|
|
}
|
|
static method main() → void {
|
|
exp::Expect::equals(#C1, "val");
|
|
exp::Expect::equals(#C2, 2);
|
|
exp::Expect::equals(#C3, null);
|
|
exp::Expect::equals(#C2, 2);
|
|
exp::Expect::equals(#C6, 3);
|
|
exp::Expect::equals(#C8, 4);
|
|
exp::Expect::equals(#C2, 2);
|
|
}
|
|
|
|
constants {
|
|
#C1 = "val"
|
|
#C2 = 2
|
|
#C3 = null
|
|
#C4 = "key1"
|
|
#C5 = "key2"
|
|
#C6 = 3
|
|
#C7 = "key3"
|
|
#C8 = 4
|
|
#C9 = <core::String*, core::int*>{#C4:#C2, #C5:#C6, #C7:#C8)
|
|
#C10 = "key"
|
|
#C11 = <core::String*, core::int*>{#C10:#C2)
|
|
}
|