Showing
1 changed file
with
34 additions
and
15 deletions
| @@ -19,38 +19,50 @@ void main() { | @@ -19,38 +19,50 @@ void main() { | ||
| 19 | ); | 19 | ); |
| 20 | 20 | ||
| 21 | test('wl tp: BoxFit.none', () { | 21 | test('wl tp: BoxFit.none', () { |
| 22 | - ctx.testScanWindow(BoxFit.none, const Rect.fromLTRB(0.275, 0.4, 0.725, 0.6)); | 22 | + ctx.testScanWindow( |
| 23 | + BoxFit.none, const Rect.fromLTRB(0.275, 0.4, 0.725, 0.6)); | ||
| 23 | }); | 24 | }); |
| 24 | 25 | ||
| 25 | test('wl tp: BoxFit.fill', () { | 26 | test('wl tp: BoxFit.fill', () { |
| 26 | - ctx.testScanWindow(BoxFit.fill, const Rect.fromLTRB(0.25, 0.25, 0.75, 0.75)); | 27 | + ctx.testScanWindow( |
| 28 | + BoxFit.fill, const Rect.fromLTRB(0.25, 0.25, 0.75, 0.75)); | ||
| 27 | }); | 29 | }); |
| 28 | 30 | ||
| 29 | test('wl tp: BoxFit.fitHeight', () { | 31 | test('wl tp: BoxFit.fitHeight', () { |
| 30 | - ctx.testScanWindow(BoxFit.fitHeight, const Rect.fromLTRB(0.0, 0.25, 1.0, 0.75)); | 32 | + ctx.testScanWindow( |
| 33 | + BoxFit.fitHeight, const Rect.fromLTRB(0.0, 0.25, 1.0, 0.75)); | ||
| 31 | }); | 34 | }); |
| 32 | 35 | ||
| 33 | test('wl tp: BoxFit.fitWidth', () { | 36 | test('wl tp: BoxFit.fitWidth', () { |
| 34 | - ctx.testScanWindow(BoxFit.fitWidth, const Rect.fromLTRB(0.25, 0.38888888888888895, 0.75, 0.6111111111111112)); | 37 | + ctx.testScanWindow( |
| 38 | + BoxFit.fitWidth, | ||
| 39 | + const Rect.fromLTRB( | ||
| 40 | + 0.25, 0.38888888888888895, 0.75, 0.6111111111111112)); | ||
| 35 | }); | 41 | }); |
| 36 | 42 | ||
| 37 | test('wl tp: BoxFit.cover', () { | 43 | test('wl tp: BoxFit.cover', () { |
| 38 | // equal to fitWidth | 44 | // equal to fitWidth |
| 39 | - ctx.testScanWindow(BoxFit.cover, const Rect.fromLTRB(0.25, 0.38888888888888895, 0.75, 0.6111111111111112)); | 45 | + ctx.testScanWindow( |
| 46 | + BoxFit.cover, | ||
| 47 | + const Rect.fromLTRB( | ||
| 48 | + 0.25, 0.38888888888888895, 0.75, 0.6111111111111112)); | ||
| 40 | }); | 49 | }); |
| 41 | 50 | ||
| 42 | test('wl tp: BoxFit.contain', () { | 51 | test('wl tp: BoxFit.contain', () { |
| 43 | // equal to fitHeigth | 52 | // equal to fitHeigth |
| 44 | - ctx.testScanWindow(BoxFit.contain, const Rect.fromLTRB(0.0, 0.25, 1.0, 0.75)); | 53 | + ctx.testScanWindow( |
| 54 | + BoxFit.contain, const Rect.fromLTRB(0.0, 0.25, 1.0, 0.75)); | ||
| 45 | }); | 55 | }); |
| 46 | 56 | ||
| 47 | test('wl tp: BoxFit.scaleDown', () { | 57 | test('wl tp: BoxFit.scaleDown', () { |
| 48 | // equal to fitHeigth, contain | 58 | // equal to fitHeigth, contain |
| 49 | - ctx.testScanWindow(BoxFit.scaleDown, const Rect.fromLTRB(0.0, 0.25, 1.0, 0.75)); | 59 | + ctx.testScanWindow( |
| 60 | + BoxFit.scaleDown, const Rect.fromLTRB(0.0, 0.25, 1.0, 0.75)); | ||
| 50 | }); | 61 | }); |
| 51 | }); | 62 | }); |
| 52 | 63 | ||
| 53 | - group('Widget (landscape) smaller than texture and texture (landscape)', () { | 64 | + group('Widget (landscape) smaller than texture and texture (landscape)', |
| 65 | + () { | ||
| 54 | const textureSize = Size(640.0, 480.0); | 66 | const textureSize = Size(640.0, 480.0); |
| 55 | const widgetSize = Size(320.0, 120.0); | 67 | const widgetSize = Size(320.0, 120.0); |
| 56 | final ctx = ScanWindowTestContext( | 68 | final ctx = ScanWindowTestContext( |
| @@ -65,34 +77,41 @@ void main() { | @@ -65,34 +77,41 @@ void main() { | ||
| 65 | ); | 77 | ); |
| 66 | 78 | ||
| 67 | test('wl tl: BoxFit.none', () { | 79 | test('wl tl: BoxFit.none', () { |
| 68 | - ctx.testScanWindow(BoxFit.none, const Rect.fromLTRB(0.375, 0.4375, 0.625, 0.5625)); | 80 | + ctx.testScanWindow( |
| 81 | + BoxFit.none, const Rect.fromLTRB(0.375, 0.4375, 0.625, 0.5625)); | ||
| 69 | }); | 82 | }); |
| 70 | 83 | ||
| 71 | test('wl tl: BoxFit.fill', () { | 84 | test('wl tl: BoxFit.fill', () { |
| 72 | - ctx.testScanWindow(BoxFit.fill, const Rect.fromLTRB(0.25, 0.25, 0.75, 0.75)); | 85 | + ctx.testScanWindow( |
| 86 | + BoxFit.fill, const Rect.fromLTRB(0.25, 0.25, 0.75, 0.75)); | ||
| 73 | }); | 87 | }); |
| 74 | 88 | ||
| 75 | test('wl tl: BoxFit.fitHeight', () { | 89 | test('wl tl: BoxFit.fitHeight', () { |
| 76 | - ctx.testScanWindow(BoxFit.fitHeight, const Rect.fromLTRB(0.0, 0.25, 1.0, 0.75)); | 90 | + ctx.testScanWindow( |
| 91 | + BoxFit.fitHeight, const Rect.fromLTRB(0.0, 0.25, 1.0, 0.75)); | ||
| 77 | }); | 92 | }); |
| 78 | 93 | ||
| 79 | test('wl tl: BoxFit.fitWidth', () { | 94 | test('wl tl: BoxFit.fitWidth', () { |
| 80 | - ctx.testScanWindow(BoxFit.fitWidth, const Rect.fromLTRB(0.25, 0.375, 0.75, 0.625)); | 95 | + ctx.testScanWindow( |
| 96 | + BoxFit.fitWidth, const Rect.fromLTRB(0.25, 0.375, 0.75, 0.625)); | ||
| 81 | }); | 97 | }); |
| 82 | 98 | ||
| 83 | test('wl tl: BoxFit.cover', () { | 99 | test('wl tl: BoxFit.cover', () { |
| 84 | // equal to fitWidth | 100 | // equal to fitWidth |
| 85 | - ctx.testScanWindow(BoxFit.cover, const Rect.fromLTRB(0.25, 0.375, 0.75, 0.625)); | 101 | + ctx.testScanWindow( |
| 102 | + BoxFit.cover, const Rect.fromLTRB(0.25, 0.375, 0.75, 0.625)); | ||
| 86 | }); | 103 | }); |
| 87 | 104 | ||
| 88 | test('wl tl: BoxFit.contain', () { | 105 | test('wl tl: BoxFit.contain', () { |
| 89 | // equal to fitHeigth | 106 | // equal to fitHeigth |
| 90 | - ctx.testScanWindow(BoxFit.contain, const Rect.fromLTRB(0.0, 0.25, 1.0, 0.75)); | 107 | + ctx.testScanWindow( |
| 108 | + BoxFit.contain, const Rect.fromLTRB(0.0, 0.25, 1.0, 0.75)); | ||
| 91 | }); | 109 | }); |
| 92 | 110 | ||
| 93 | test('wl tl: BoxFit.scaleDown', () { | 111 | test('wl tl: BoxFit.scaleDown', () { |
| 94 | // equal to fitHeigth, contain | 112 | // equal to fitHeigth, contain |
| 95 | - ctx.testScanWindow(BoxFit.scaleDown, const Rect.fromLTRB(0.0, 0.25, 1.0, 0.75)); | 113 | + ctx.testScanWindow( |
| 114 | + BoxFit.scaleDown, const Rect.fromLTRB(0.0, 0.25, 1.0, 0.75)); | ||
| 96 | }); | 115 | }); |
| 97 | }); | 116 | }); |
| 98 | }); | 117 | }); |
-
Please register or login to post a comment