Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
00970710
Unverified
Commit
00970710
authored
May 28, 2018
by
Mikkel Nygaard Ravn
Committed by
GitHub
May 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[await sync-async flag] Add test of sync async execution (#16795)
parent
3ced55a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
dart_test.dart
packages/flutter/test/engine/dart_test.dart
+26
-0
No files found.
packages/flutter/test/engine/dart_test.dart
0 → 100644
View file @
00970710
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'package:test/test.dart'
;
/// Verifies Dart semantics governed by flags set by Flutter tooling.
void
main
(
)
{
group
(
'Async'
,
()
{
String
greeting
=
'hello'
;
Future
<
void
>
changeGreeting
()
async
{
greeting
+=
' 1'
;
await
new
Future
<
void
>.
value
(
null
);
greeting
+=
' 2'
;
}
test
(
'execution of async method starts synchronously'
,
()
async
{
expect
(
greeting
,
'hello'
);
final
Future
<
void
>
future
=
changeGreeting
();
expect
(
greeting
,
'hello 1'
);
await
future
;
expect
(
greeting
,
'hello 1 2'
);
});
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment