这是indexloc提供的服务,不要输入任何密码
Skip to content

Get the test updater script working again. #1743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2025
Merged

Conversation

munificent
Copy link
Member

When I made the style changes language versions for Dart 3.8, I changed how tests are written to allow a single test to have different expected outputs at different language versions.

I was pressed for time, so that broke the automated test updater which doesn't know how to handle versions. This gets it working again.

In the process, I decided to tweak how the final newline in test files is handled. For years, I avoided having a trailing newline because I though it would confuse the formatter. At some point that may have even been true. But it turns out to be fine and it's more idiomatic to have a trailing newline at the end of a text file.

The test updater now ensures that and I went ahead and normalized all of the tests to have trailing newlines. There are no other changes to the test files. The only actual change in this PR is at the very end in tool/update_tests.dart.

When I made the style changes language versions for Dart 3.8, I changed
how tests are written to allow a single test to have different expected
outputs at different language versions.

I was pressed for time, so that broke the automated test updater which
doesn't know how to handle versions. This gets it working again.

In the process, I decided to tweak how the final newline in test files
is handled. For years, I avoided having a trailing newline because I
though it would confuse the formatter. At some point that may have even
been true. But it turns out to be fine and it's more idiomatic to have a
trailing newline at the end of a text file.

The test updater now ensures that and I went ahead and normalized all
of the tests to have trailing newlines. There are no other changes to
the test files.
@munificent munificent requested review from natebosch and kallentu July 17, 2025 18:00
@munificent munificent merged commit ac2650a into main Jul 17, 2025
7 checks passed
@munificent munificent deleted the fix-test-updater branch July 17, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants