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
81803cac
Unverified
Commit
81803cac
authored
Apr 26, 2019
by
Dan Field
Committed by
GitHub
Apr 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove engine tests (#31452)
parent
1ece6233
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
0 additions
and
285 deletions
+0
-285
color_test.dart
packages/flutter/test/engine/color_test.dart
+0
-44
dart_test.dart
packages/flutter/test/engine/dart_test.dart
+0
-26
paragraph_builder_test.dart
packages/flutter/test/engine/paragraph_builder_test.dart
+0
-20
paragraph_test.dart
packages/flutter/test/engine/paragraph_test.dart
+0
-62
rect_test.dart
packages/flutter/test/engine/rect_test.dart
+0
-37
rrect_test.dart
packages/flutter/test/engine/rrect_test.dart
+0
-47
task_order_test.dart
packages/flutter/test/engine/task_order_test.dart
+0
-49
No files found.
packages/flutter/test/engine/color_test.dart
deleted
100644 → 0
View file @
1ece6233
// Copyright 2015 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:ui'
;
import
'package:test_api/test_api.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
test
(
'color accessors should work'
,
()
{
const
Color
foo
=
Color
(
0x12345678
);
expect
(
foo
.
alpha
,
equals
(
0x12
));
expect
(
foo
.
red
,
equals
(
0x34
));
expect
(
foo
.
green
,
equals
(
0x56
));
expect
(
foo
.
blue
,
equals
(
0x78
));
});
test
(
'paint set to black'
,
()
{
const
Color
c
=
Color
(
0x00000000
);
final
Paint
p
=
Paint
();
p
.
color
=
c
;
expect
(
c
.
toString
(),
equals
(
'Color(0x00000000)'
));
});
test
(
'color created with out of bounds value'
,
()
{
try
{
const
Color
c
=
Color
(
0x100
<<
24
);
final
Paint
p
=
Paint
();
p
.
color
=
c
;
}
catch
(
e
)
{
expect
(
e
!=
null
,
equals
(
true
));
}
});
test
(
'color created with wildly out of bounds value'
,
()
{
try
{
const
Color
c
=
Color
(
1
<<
1000000
);
final
Paint
p
=
Paint
();
p
.
color
=
c
;
}
catch
(
e
)
{
expect
(
e
!=
null
,
equals
(
true
));
}
});
}
packages/flutter/test/engine/dart_test.dart
deleted
100644 → 0
View file @
1ece6233
// 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_api/test_api.dart'
hide
TypeMatcher
,
isInstanceOf
;
/// Verifies Dart semantics governed by flags set by Flutter tooling.
void
main
(
)
{
group
(
'Async'
,
()
{
String
greeting
=
'hello'
;
Future
<
void
>
changeGreeting
()
async
{
greeting
+=
' 1'
;
await
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'
);
});
});
}
packages/flutter/test/engine/paragraph_builder_test.dart
deleted
100644 → 0
View file @
1ece6233
// Copyright 2015 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:ui'
;
import
'package:test_api/test_api.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
test
(
'Should be able to build and layout a paragraph'
,
()
{
final
ParagraphBuilder
builder
=
ParagraphBuilder
(
ParagraphStyle
());
builder
.
addText
(
'Hello'
);
final
Paragraph
paragraph
=
builder
.
build
();
expect
(
paragraph
,
isNotNull
);
paragraph
.
layout
(
const
ParagraphConstraints
(
width:
800.0
));
expect
(
paragraph
.
width
,
isNonZero
);
expect
(
paragraph
.
height
,
isNonZero
);
});
}
packages/flutter/test/engine/paragraph_test.dart
deleted
100644 → 0
View file @
1ece6233
// 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:ui'
;
import
'package:flutter_test/flutter_test.dart'
;
void
main
(
)
{
// Ahem font uses a constant ideographic/alphabetic baseline ratio.
const
double
kAhemBaselineRatio
=
1.25
;
test
(
'predictably lays out a single-line paragraph'
,
()
{
for
(
double
fontSize
in
<
double
>[
10.0
,
20.0
,
30.0
,
40.0
])
{
final
ParagraphBuilder
builder
=
ParagraphBuilder
(
ParagraphStyle
(
fontFamily:
'Ahem'
,
fontStyle:
FontStyle
.
normal
,
fontWeight:
FontWeight
.
normal
,
fontSize:
fontSize
,
));
builder
.
addText
(
'Test'
);
final
Paragraph
paragraph
=
builder
.
build
();
paragraph
.
layout
(
const
ParagraphConstraints
(
width:
400.0
));
expect
(
paragraph
.
height
,
closeTo
(
fontSize
,
0.001
));
expect
(
paragraph
.
width
,
closeTo
(
400.0
,
0.001
));
expect
(
paragraph
.
minIntrinsicWidth
,
closeTo
(
fontSize
*
4.0
,
0.001
));
expect
(
paragraph
.
maxIntrinsicWidth
,
closeTo
(
fontSize
*
4.0
,
0.001
));
expect
(
paragraph
.
alphabeticBaseline
,
closeTo
(
fontSize
*
.
8
,
0.001
));
expect
(
paragraph
.
ideographicBaseline
,
closeTo
(
paragraph
.
alphabeticBaseline
*
kAhemBaselineRatio
,
0.001
),
);
}
});
test
(
'predictably lays out a multi-line paragraph'
,
()
{
for
(
double
fontSize
in
<
double
>[
10.0
,
20.0
,
30.0
,
40.0
])
{
final
ParagraphBuilder
builder
=
ParagraphBuilder
(
ParagraphStyle
(
fontFamily:
'Ahem'
,
fontStyle:
FontStyle
.
normal
,
fontWeight:
FontWeight
.
normal
,
fontSize:
fontSize
,
));
builder
.
addText
(
'Test Ahem'
);
final
Paragraph
paragraph
=
builder
.
build
();
paragraph
.
layout
(
ParagraphConstraints
(
width:
fontSize
*
5.0
));
expect
(
paragraph
.
height
,
closeTo
(
fontSize
*
2.0
,
0.001
));
// because it wraps
expect
(
paragraph
.
width
,
closeTo
(
fontSize
*
5.0
,
0.001
));
expect
(
paragraph
.
minIntrinsicWidth
,
closeTo
(
fontSize
*
4.0
,
0.001
));
// TODO(yjbanov): see https://github.com/flutter/flutter/issues/21965
expect
(
paragraph
.
maxIntrinsicWidth
,
closeTo
(
fontSize
*
9.0
,
0.001
));
expect
(
paragraph
.
alphabeticBaseline
,
closeTo
(
fontSize
*
.
8
,
0.001
));
expect
(
paragraph
.
ideographicBaseline
,
closeTo
(
paragraph
.
alphabeticBaseline
*
kAhemBaselineRatio
,
0.001
),
);
}
});
}
packages/flutter/test/engine/rect_test.dart
deleted
100644 → 0
View file @
1ece6233
// Copyright 2015 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:ui'
;
import
'package:test_api/test_api.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
test
(
'rect accessors'
,
()
{
final
Rect
r
=
Rect
.
fromLTRB
(
1.0
,
3.0
,
5.0
,
7.0
);
expect
(
r
.
left
,
equals
(
1.0
));
expect
(
r
.
top
,
equals
(
3.0
));
expect
(
r
.
right
,
equals
(
5.0
));
expect
(
r
.
bottom
,
equals
(
7.0
));
});
test
(
'rect created by width and height'
,
()
{
final
Rect
r
=
Rect
.
fromLTWH
(
1.0
,
3.0
,
5.0
,
7.0
);
expect
(
r
.
left
,
equals
(
1.0
));
expect
(
r
.
top
,
equals
(
3.0
));
expect
(
r
.
right
,
equals
(
6.0
));
expect
(
r
.
bottom
,
equals
(
10.0
));
});
test
(
'rect intersection'
,
()
{
final
Rect
r1
=
Rect
.
fromLTRB
(
0.0
,
0.0
,
100.0
,
100.0
);
final
Rect
r2
=
Rect
.
fromLTRB
(
50.0
,
50.0
,
200.0
,
200.0
);
final
Rect
r3
=
r1
.
intersect
(
r2
);
expect
(
r3
.
left
,
equals
(
50.0
));
expect
(
r3
.
top
,
equals
(
50.0
));
expect
(
r3
.
right
,
equals
(
100.0
));
expect
(
r3
.
bottom
,
equals
(
100.0
));
final
Rect
r4
=
r2
.
intersect
(
r1
);
expect
(
r4
,
equals
(
r3
));
});
}
packages/flutter/test/engine/rrect_test.dart
deleted
100644 → 0
View file @
1ece6233
// Copyright 2015 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
'package:flutter/painting.dart'
;
import
'package:test_api/test_api.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
test
(
'RRect.contains()'
,
()
{
final
RRect
rrect
=
RRect
.
fromRectAndCorners
(
Rect
.
fromLTRB
(
1.0
,
1.0
,
2.0
,
2.0
),
topLeft:
const
Radius
.
circular
(
0.5
),
topRight:
const
Radius
.
circular
(
0.25
),
bottomRight:
const
Radius
.
elliptical
(
0.25
,
0.75
),
bottomLeft:
Radius
.
zero
,
);
expect
(
rrect
.
contains
(
const
Offset
(
1.0
,
1.0
)),
isFalse
);
expect
(
rrect
.
contains
(
const
Offset
(
1.1
,
1.1
)),
isFalse
);
expect
(
rrect
.
contains
(
const
Offset
(
1.15
,
1.15
)),
isTrue
);
expect
(
rrect
.
contains
(
const
Offset
(
2.0
,
1.0
)),
isFalse
);
expect
(
rrect
.
contains
(
const
Offset
(
1.93
,
1.07
)),
isFalse
);
expect
(
rrect
.
contains
(
const
Offset
(
1.97
,
1.7
)),
isFalse
);
expect
(
rrect
.
contains
(
const
Offset
(
1.7
,
1.97
)),
isTrue
);
expect
(
rrect
.
contains
(
const
Offset
(
1.0
,
1.99
)),
isTrue
);
});
test
(
'RRect.contains() large radii'
,
()
{
final
RRect
rrect
=
RRect
.
fromRectAndCorners
(
Rect
.
fromLTRB
(
1.0
,
1.0
,
2.0
,
2.0
),
topLeft:
const
Radius
.
circular
(
5000.0
),
topRight:
const
Radius
.
circular
(
2500.0
),
bottomRight:
const
Radius
.
elliptical
(
2500.0
,
7500.0
),
bottomLeft:
Radius
.
zero
,
);
expect
(
rrect
.
contains
(
const
Offset
(
1.0
,
1.0
)),
isFalse
);
expect
(
rrect
.
contains
(
const
Offset
(
1.1
,
1.1
)),
isFalse
);
expect
(
rrect
.
contains
(
const
Offset
(
1.15
,
1.15
)),
isTrue
);
expect
(
rrect
.
contains
(
const
Offset
(
2.0
,
1.0
)),
isFalse
);
expect
(
rrect
.
contains
(
const
Offset
(
1.93
,
1.07
)),
isFalse
);
expect
(
rrect
.
contains
(
const
Offset
(
1.97
,
1.7
)),
isFalse
);
expect
(
rrect
.
contains
(
const
Offset
(
1.7
,
1.97
)),
isTrue
);
expect
(
rrect
.
contains
(
const
Offset
(
1.0
,
1.99
)),
isTrue
);
});
}
packages/flutter/test/engine/task_order_test.dart
deleted
100644 → 0
View file @
1ece6233
// Copyright 2017 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_api/test_api.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
test
(
'Message loop flushes microtasks between iterations'
,
()
async
{
final
List
<
int
>
tasks
=
<
int
>[];
tasks
.
add
(
1
);
// Flush 0 microtasks.
await
Future
<
void
>.
delayed
(
Duration
.
zero
);
scheduleMicrotask
(()
{
tasks
.
add
(
3
);
});
scheduleMicrotask
(()
{
tasks
.
add
(
4
);
});
tasks
.
add
(
2
);
// Flush 2 microtasks.
await
Future
<
void
>.
delayed
(
Duration
.
zero
);
scheduleMicrotask
(()
{
tasks
.
add
(
6
);
});
scheduleMicrotask
(()
{
tasks
.
add
(
7
);
});
scheduleMicrotask
(()
{
tasks
.
add
(
8
);
});
tasks
.
add
(
5
);
// Flush 3 microtasks.
await
Future
<
void
>.
delayed
(
Duration
.
zero
);
tasks
.
add
(
9
);
expect
(
tasks
,
<
int
>[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
]);
});
}
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