Skip to content

Commit c371ad7

Browse files
author
Anna Gringauze
authored
Fix chrome_proxy_service tests broken after switch to null safety by default (#1957)
* Validate only needed summaries in expression_compiler_service * Fix broken chrome proxy tests broken after null safety by default
1 parent d6ec127 commit c371ad7

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

dwds/test/chrome_proxy_service_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ void main() {
504504
!f.isConst! &&
505505
!f.isFinal!),
506506
]));
507-
}, skip: 'https://github.com/dart-lang/webdev/issues/1818');
507+
});
508508

509509
test('Runtime classes', () async {
510510
final testClass = await service.getObject(
@@ -966,7 +966,7 @@ void main() {
966966
!f.isConst! &&
967967
!f.isFinal!),
968968
]));
969-
}, skip: 'https://github.com/dart-lang/webdev/issues/1818');
969+
});
970970

971971
test('offset/count parameters are ignored for bools', () async {
972972
final ref = await service.evaluate(
@@ -1008,7 +1008,7 @@ void main() {
10081008
expect(obj.kind, InstanceKind.kNull);
10091009
expect(obj.classRef!.name, 'Null');
10101010
expect(obj.valueAsString, 'null');
1011-
}, skip: 'https://github.com/dart-lang/webdev/issues/1818');
1011+
});
10121012
});
10131013
});
10141014

fixtures/_testSound/example/hello_world/main.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ String helloString(String response) => response;
109109

110110
bool helloBool(bool response) => response;
111111

112-
num helloNum(num response) => response;
112+
num? helloNum(num? response) => response;
113113

114114
MyTestClass createObject(String message) => MyTestClass(message: message);
115115

@@ -120,9 +120,13 @@ String messagesCombined(MyTestClass a, MyTestClass b) => a.message + b.message;
120120
class MyTestClass {
121121
final String message;
122122

123-
String notFinal;
123+
String? notFinal;
124124

125-
MyTestClass({this.message = 'world'}) : notFinal = 'wonderful';
125+
static final String staticMessage = 'static';
126+
127+
static String staticHello() => 'static hello';
128+
129+
MyTestClass({this.message = 'world'});
126130

127131
String hello() => message;
128132
}

0 commit comments

Comments
 (0)