Unverified Commit 90ddb237 authored by Vyacheslav Egorov's avatar Vyacheslav Egorov Committed by GitHub

Fix text_style_text.dart to be Dart 2 compliant. (#14559)

In Dart 2 mode we throw different exception: compiler generates
throw of a compilation error instead of runtime throwing
noSuchMethod.
parent 7982694a
......@@ -23,7 +23,7 @@ void main() {
fontWeight: FontWeight.w800,
height: 123.0,
);
expect(() { s1.fontFamily = 'test'; }, throwsA(isNoSuchMethodError)); // ignore: ASSIGNMENT_TO_FINAL
expect(() { s1.fontFamily = 'test'; }, throwsA(const isInstanceOf<Error>())); // ignore: ASSIGNMENT_TO_FINAL
expect(s1.fontFamily, isNull);
expect(s1.fontSize, 10.0);
expect(s1.fontWeight, FontWeight.w800);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment