tree: 3e0f16bb392981d85a7edf7da0361041af469c0f [search]
  1. augmentations/
  2. class_modifiers/
  3. closure_context_lowering/
  4. const_functions/
  5. constructor_tearoffs/
  6. coverage/
  7. dart2js/
  8. dart2wasm/
  9. dartdevc/
  10. dartino/
  11. dot_shorthands/
  12. enhanced_enums/
  13. enhanced_parts/
  14. expression/
  15. extension_types/
  16. extensions/
  17. external_effect/
  18. general/
  19. generic_metadata/
  20. getter_setter_error/
  21. implicit_getter_calls/
  22. incremental/
  23. inference/
  24. inference_new/
  25. inference_update_1/
  26. inference_update_2/
  27. inference_update_3/
  28. inference_update_4/
  29. inference_using_bounds/
  30. instantiate_to_bound/
  31. late_lowering/
  32. late_lowering_sentinel/
  33. mixin_in_outline/
  34. named_arguments_anywhere/
  35. nnbd/
  36. no_such_method_forwarders/
  37. none/
  38. nonfunction_type_aliases/
  39. null_aware_elements/
  40. offsets/
  41. patterns/
  42. primary_constructors/
  43. private_named_parameters/
  44. rasta/
  45. records/
  46. regress/
  47. runtime_checks/
  48. runtime_checks_new/
  49. sealed_class/
  50. set_literals/
  51. static_extensions/
  52. static_field_lowering/
  53. super_parameters/
  54. triple_shift/
  55. unified_collections/
  56. variance/
  57. wildcard_variables/
  58. expression.status
  59. incremental.status
  60. incremental_bulk_compiler_full.status
  61. incremental_bulk_compiler_smoke.status
  62. incremental_dartino.status
  63. modular.status
  64. outline.status
  65. OWNERS
  66. pubspec.yaml
  67. README.md
  68. sdk.status
  69. strong.status
  70. textual_outline.status
pkg/front_end/testcases/README.md

Overview

The testcases in this directory and its subdirectory are all compiled in various different configurations designed to test various aspects of Fasta (or more generally, package:front_end).

The configurations are described below.

The source of truth for these configurations is the file pkg/front_end/testing.json.

Updating all expectations

To update test expectations for all tests at once, run:

dart pkg/front_end/tool/update_expectations.dart

Note that this takes a long time and should only be used when many tests need updating.

Updating expectations for a single test

To update the expectations for a specific test, provide the folder and test name as an argument.

For example, if you want to update the test expectations for a test, such as pkg/front_end/testcases/general/abstract_instantiation.dart, then run:

dart pkg/front_end/tool/update_expectations.dart general/abstract_instantiation

Updating expectations for all tests in a folder

If you want to update the test expectations for a specific folder of tests such as the pkg/front_end/testcases/general/ folder, then run:

dart pkg/front_end/tool/update_expectations.dart general/...

Dart 3.0 Outlines

./pkg/front_end/tool/cfe testing -DupdateExpectations=true outline/test1 outline/test2 ...

Dart 3.0 (strong mode)

./pkg/front_end/tool/cfe testing -DupdateExpectations=true -DupdateComments=true strong/test1 strong/test2 ...

Note: strong mode configuration additionally parses comments in the test file and can precisely match internal details of the compiler such as the inferred type of an expression or if a warning was emitted at a given location.