Skip to content

Commit e008fff

Browse files
committed
Fix e2e_test to work with current DDC output
Add a top level method and expect the result of calling that method in an expression evaluation. The existing test for expression evaluation in the context of a library relied on the output of the `.toString()` of a top level method tearoff. This representation changed recently causing the test to fail.
1 parent 64492b2 commit e008fff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

webdev/test/e2e_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,15 +382,15 @@ void main() {
382382
'valueAsString',
383383
'Hello World!!'));
384384

385-
result =
386-
await vmService.evaluate(isolateId, libraryId, 'main.toString()');
385+
result = await vmService.evaluate(
386+
isolateId, libraryId, 'topLevelMethod()');
387387

388388
expect(
389389
result,
390390
const TypeMatcher<InstanceRef>().having(
391391
(instance) => instance.valueAsString,
392392
'valueAsString',
393-
contains('Closure: () => void')));
393+
equals('verify this!')));
394394
} finally {
395395
await vmService?.dispose();
396396
await exitWebdev(process);
@@ -555,7 +555,7 @@ void main() {
555555

556556
expect(
557557
() =>
558-
vmService!.evaluate(isolateId, libraryId, 'main.toString()'),
558+
vmService!.evaluate(isolateId, libraryId, 'topLevelMethod()'),
559559
throwsRPCError);
560560
} finally {
561561
await vmService?.dispose();

0 commit comments

Comments
 (0)