Commit graph

21 commits

Author SHA1 Message Date
Jonah Williams 445505d6f2
Devfs cleanup and testing (#33374) 2019-05-30 16:13:46 -07:00
Alexandre Ardhuin 5169ab5974
format parameter list (#27261) 2019-02-21 09:27:07 +01:00
Alexandre Ardhuin 2d3ff10d62
apply lint prefer_void_to_null in packages/flutter_tools (#22686) 2018-10-05 07:54:56 +02:00
Alexandre Ardhuin d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Danny Tuppeny 11ee2f71af
Move asset_bundle_package_test to MemoryFileSystem to avoid setting fs.currentDirectory in tests (#21427)
* Update asset_bundle_package_test to use MemoryFileSystem

This updates all tests in this file to use a memory filesystem (same as I did for asset_bundle_package_font_test) based on the current platform.

There were already a few minor tests at the bottom using a MemoryFileSystem and being run for all platforms - however this complicated the shared code I changed above to support Windows natively so I changed them to also work the same as others (that is, they just run the native platforms so require running on all to get full coverage - though this is the case for almost all other tests anyway).

* Move fixPath to the correct place
2018-09-05 19:30:55 +01:00
Danny Tuppeny a74f591d0c
Change asset_bundle_package_font_test to memory file system (#21114)
* Change assert_bundle_package_font_test to memory file system

This is to work towards being able to run the tests without `-j1` (#21113). These tests were using the real filesystem and setting/relying on fs.currentDirectory. There was a comment about this being because the memory provider didnt' support POSIX and Windows, however that seems to have changed since (and many other asset tests already do something similar to this).

* Trim trailing whitespace

* Add a workaround for Windows path slash directions

Strictly this is correct, but the real FS can tolerate either path. The in-memory file system is more strict (see https://github.com/google/file.dart/issues/112).

* Extract a helper for writing schema files in tests

* Missed file when saving!

* Remove redundant comment

* Rename writeBasicSchema -> writeEmptySchema

* Use the file we already have to write contents

* Make comments more descriptive

* Remove another dupe of writeSchema to use the shared one

* Rename schema -> pubspec_schema

* Trim whitespace
2018-09-04 17:12:24 +01:00
Ian Hickson 3dec6a6930
Clean up usage of temporary directories (#20682)
All temporary directory start with `flutter_` and have their random component separated from the name by a period, as in `flutter_test_bundle.YFYQMY`.

I've tried to find some of the places where we didn't cleanly delete temporary directories, too. This greatly reduces, though it does not entirely eliminate, the directories we leave behind when running tests, especially `flutter_tools` tests.

While I was at it I standardized on `tempDir` as the variable name for temporary directories, since it was the most common, removing occurrences of `temp` and `tmp`, among others.

Also I factored out some common code that used to catch exceptions that happen on Windows, and made more places use that pattern.
2018-08-17 13:17:23 -07:00
Ian Hickson 686d8f8a22 Shim package:test to avoid matcher issues (#20602)
* Upgrade everything except matcher.
* Roll matcher (and test)
* Adjust tests that depend on flutter:test directly to depend on a shim
* Require use of package:test shim and remove other references to package:test
2018-08-14 20:33:58 -07:00
fmatosqg 197d4315a9 Scan assets from disk (#16413)
Scan folders when asset specified finishes with `/`
2018-05-20 17:52:33 -07:00
Todd Volkert c83d24d547
Always add a DevFS asset entry for the font manifest (#16650)
The engine expects it to always be there.
2018-04-16 21:48:21 -07:00
Jason Simmons b4274ef685
URL encode asset paths to support reserved characters in paths (#16046)
Fixes https://github.com/flutter/flutter/issues/14864
2018-03-29 13:47:35 -07:00
Alexandre Ardhuin 7667db6362
apply upcomming prefer_const_declarations (#15498) 2018-03-14 06:24:49 +01:00
Jason Simmons 466d15433f
Use Dart 2 camel case constants (#15360) 2018-03-12 11:06:32 -07:00
Alexandre Ardhuin 841d5d7bd5
prefer_const_declarations on local variables (#14358) 2018-02-01 07:51:26 +01:00
Todd Volkert 1859e82a3d
Extensibility improvements to flutter_tools (#14299)
* Make the current command injected into the AppContext, allowing
  other classes to inject the current command.
* Introduce `AssetBundleFactory`, an injected factory class for
  spawning instances of `AssetBundle`. This allows other run contexts
  to use custom asset bundling logic.
* Clean up RunCommand by removing a 'packages' argument that duplicated
  a global argument by the same name (and for the same purpose).
  Duplicate arguments are confusing and error-prone.
2018-01-29 09:40:28 -08:00
Michael Goderbauer 84580b545a
Make Assets more robust across platforms (#14246) 2018-01-24 13:16:23 -08:00
Alexandre Ardhuin 1fce14a31c enable lint prefer_single_quotes (#12665) 2017-10-22 18:11:36 +02:00
Sarah Zakarias ec2d1c9116 Add support for shared fonts in packages. (#12142) 2017-09-19 14:04:51 +02:00
Sarah Zakarias e5aead03cc Comments to PR #12032 (#12045) 2017-09-12 12:53:03 +02:00
Sarah Zakarias 0b95e9c278 Support transitive asset dependency (#12032) 2017-09-12 09:13:41 +02:00
Sarah Zakarias 02c10b78d2 Bundle assets used in packages (#11751) 2017-09-05 09:42:24 +02:00