Flutter's `moreOrLessEquals` has a few advantages over `closeTo` from
the `matcher` package:
* It emits the epsilon value in the test result on failure.
* It uses a named parameter for epsilon, which improves readability
at the call site.
* It has a reasonable default for epsilon in cases where something
more specific isn't required.
Using it also has the nice property that it aids in its own discovery
when when people go looking for such functionality in new tests.
This change also includes a couple unrelated whitespace formatting cleanups.
* synthetic packages by default in gen_l10n tool
* Refactor default path for synthetic package
* Remove unused import
* Code cleanup
* Further improvements to help text
* Refactor synthetic package path
* Remove newlines
* Test cleanup
* clean up logic in inputs and outputs list function
* Update l10n.yaml usage
* only add option if value is non-null
* Update stocks app as proof of concept for synthetic package usage
* Address nits
* print pubspec contents
* add print statements
* Do not allow null value for useSyntheticPackage
* +
* +
* +
* +
* Cleanup
* Add test
* Fix text
* Dont parse pubspec directly
* Test using context
* WIP: generate synthetic packages on pub get -- needs tests
* Allow null value
* Update null handling
* Refactor to properly handle null case
* Fix yamlMap condition
* Fix yaml node for real
* WIP: struggling to write tests
* WIP - take absolute path as an option
* Add tests
* Use environment project directory for synthetic package generation pathway
* Fix typo
* Improve help text
* Update defaults
* Remove unauthorized path import
* Fix pathing issues at synthetic package generation
* Fix typo in test
* Use path.join so projectDir matches up based on OS
* Fix Windows pathing in test
* Remove unnecessary replaceApp code for projectDir.path
* Use globals.fs.currentDirectory.path in resident_runner_test.dart
* Fix merge conflict
* Add test to ensure that synthetic package is generated on pub get
* Fix resident_runner_test.dart tests
* Fix tests
* Use package:file instead of dart:io
* WIP - exploration
* Remove synthetic package use from stocks example
* Update integration test to not use synthetic packages
* Remove trailing whitespace
* flutter pub get runs synth package generation
* Remove more print statements
* Add license header
* WIP - minimally working pub.get
* Use own MockBuildSystem
* Modify test and implementation to be a little cleaner
* Fix flutter pub get invocation
* Use synthetic packages in stocks app
* Revert "Use synthetic packages in stocks app"
This reverts commit 45bf24903c.
* Add environment and buildSystem params to flutter test
* Address code review feedback
* +
* Isolate codegen into its own API
* Fix imports
* Slight refactor
* Add one more test for no l10n.yaml file
* Remove unneeded mock class and import in pub_get_test.dart
* More code review feedback
* Remove unnecessary imports
* Remove `return await`s that I missed
* use arrow functions instead
moreOrLessEquals is the preferred mechanism for checking that a value is
within some error bound epsilon, with default value for epsilon of
precisionErrorTolerance.
This patch replaces instances of closeTo using precisionErrorTolerance.
Several of our tests make use of numbers without an exact floating point
representation (frequently 0.x where x!=5) which, when scaled, also
scale the error. The end result is that some of these tests currently
implicitly rely on an implementation detail of floating point math and
are sensitive to differences in the ~15th decimal place.
This patch reduces the sensitivity of some of these tests, checking
values using `moreOrLessEquals` from the flutter_test package
rather than requiring en exact match.
* 97f9f712b [web] Fix analyzer warnings in web engine. (flutter/engine#20825)
* dcb9244c3 Consolidate FlRenderer initialization into fl_renderer_start() (flutter/engine#20763)
* 80f68fd60 Roll Fuchsia Linux SDK from lqjGEhKFW... to kbanTZZRS... (flutter/engine#20830)
* 0491b6c7d Roll Fuchsia Mac SDK from fqYfP5y9V... to tG1GErEv9... (flutter/engine#20831)
* 195b1480d Roll Skia from 55f02eb3ff5f to ee58da9d6f49 (7 revisions) (flutter/engine#20832)
* 25a23baee [fuchsia] Add fuchsia_ctl func to test script (flutter/engine#20827)
* 095e5d368 Roll Dart SDK from b0f6d5483b79 to 8e50ccae259f (2 revisions) (flutter/engine#20834)
* be21aa992 Roll Skia from ee58da9d6f49 to 716e281185b5 (2 revisions) (flutter/engine#20835)
* 808f9c27e Roll Skia from 716e281185b5 to 952f088d41e1 (1 revision) (flutter/engine#20839)
* 1a034bde7 Replace FlRenderer::get_visual() with more generic FlRenderer::setup_window_attr() (flutter/engine#20833)
* e67ae1e30 [web] Fix path rendering when addPolygon is chained with other verbs. (flutter/engine#20803)
* 3ccf1ed2e Cliprect op (flutter/engine#20837)
* 52def6e88 Roll Dart SDK from 8e50ccae259f to ac54810c36a9 (1 revision) (flutter/engine#20844)
* 8e16dbf4a Roll Skia from 952f088d41e1 to d385091edd58 (4 revisions) (flutter/engine#20847)
* 81a4748d6 Roll Dart SDK from ac54810c36a9 to 066c5625ac7b (1 revision) (flutter/engine#20849)
* cca047b2c Roll Fuchsia Linux SDK from kbanTZZRS... to jyKllAGRu... (flutter/engine#20851)
* 0208c71ad Roll Fuchsia Mac SDK from tG1GErEv9... to koO5t2tfw... (flutter/engine#20850)
* 5b3a16c5a Roll Dart SDK from 066c5625ac7b to fe5c8c44701e (1 revision) (flutter/engine#20854)
* 3f4f58f5f Roll Skia from d385091edd58 to 8a43e206609e (3 revisions) (flutter/engine#20855)
* Reland "Re-enable the Dart Development Service (DDS) (#64671)"
This reverts commit 2ae25cc2d7.
* Fix MDNS building Observatory URI with port 0 instead of forwarding the device port
* Added MDNS test
This change re-enables DDS and outputs the DDS URI in place of the VM
service URI on the console. If --disable-dds is not provided,
--host-vmservice-port will be used to determine the port for DDS rather
than the host port for the VM service, which will instead be randomly
chosen.
Avoid creating AndroidDevice discovery if the SDK cannot be located. Previously the tool would use which/where adb, however this required us to handle the AndroidSdk class being potentially null - which required an additional layer of indirection around all access. Sometimes these were forgotten leading to NPEs.
In general, not much can be done with an Android Device if the actual SDK is not installed.
Reland with fixed code + tests for null SDK + adb in AndroidDeviceDiscovery