mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
* change from build_runner to dart2js * add internalBootstrapBrowserTest to some of the tests * add internalBootstrapBrowserTest to all remaining tests * make tests build in paralel. Total time dropped from 586 to 177 seconds for 8 core MacBook * change isolates with pool * fixing analysis errors * skipping canvaskit tests for ios-safari * copy image files to the build directory * adding internalBootstrapBrowserTest to newly added tests * add internalBootstrapBrowserTest to faling path iterator test * necessary changes to make chrome windows work * in windows test in chrome instead of edge. our edge code was for legacy edge * do not run golden unit tests on Windows LUCI bots for now * addressing reviewer comments. Adding a method for deciding when to run integration tests. * remove lines that I forgot to remove * fixing analysis error. add issue for todo * add bootstap to a test file * adding bootstrap to another test * add internalBootstrapBrowserTest to a golden test * return test result in bat file. use archieve package to unzip * fixing logs for chrome_installer * use archieve and archieve entity instead of dynamic * adding comments for windows platform archieve part * addressing reviewer comments * change readme file
44 lines
1.8 KiB
Dart
44 lines
1.8 KiB
Dart
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// @dart = 2.6
|
|
import 'dart:typed_data';
|
|
|
|
import 'package:test/bootstrap/browser.dart';
|
|
import 'package:test/test.dart';
|
|
import 'package:ui/src/engine.dart';
|
|
|
|
final Float32List identityTransform = Matrix4.identity().storage;
|
|
final Float32List xTranslation = (Matrix4.identity()..translate(10)).storage;
|
|
final Float32List yTranslation = (Matrix4.identity()..translate(0, 10)).storage;
|
|
final Float32List zTranslation = (Matrix4.identity()..translate(0, 0, 10)).storage;
|
|
final Float32List scaleAndTranslate2d = (Matrix4.identity()..scale(2, 3, 1)..translate(4, 5, 0)).storage;
|
|
final Float32List rotation2d = (Matrix4.identity()..rotateZ(0.2)).storage;
|
|
|
|
void main() {
|
|
internalBootstrapBrowserTest(() => testMain);
|
|
}
|
|
|
|
void testMain() {
|
|
test('transformKindOf and isIdentityFloat32ListTransform identify matrix kind', () {
|
|
expect(transformKindOf(identityTransform), TransformKind.identity);
|
|
expect(isIdentityFloat32ListTransform(identityTransform), isTrue);
|
|
|
|
expect(transformKindOf(zTranslation), TransformKind.complex);
|
|
expect(isIdentityFloat32ListTransform(zTranslation), isFalse);
|
|
|
|
expect(transformKindOf(xTranslation), TransformKind.transform2d);
|
|
expect(isIdentityFloat32ListTransform(xTranslation), isFalse);
|
|
|
|
expect(transformKindOf(yTranslation), TransformKind.transform2d);
|
|
expect(isIdentityFloat32ListTransform(yTranslation), isFalse);
|
|
|
|
expect(transformKindOf(scaleAndTranslate2d), TransformKind.transform2d);
|
|
expect(isIdentityFloat32ListTransform(scaleAndTranslate2d), isFalse);
|
|
|
|
expect(transformKindOf(rotation2d), TransformKind.transform2d);
|
|
expect(isIdentityFloat32ListTransform(rotation2d), isFalse);
|
|
});
|
|
}
|