-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
[test-infra][2/n] Replace Move's .exp tests with cargo-insta #21004
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me, although I didn't go through every single snap file...
Just a couple little nits where things might be able to be cleaned up.
_ if path_extension == MOVE_EXTENSION => None, | ||
_ if path_extension == TEST_EXT => Some(TEST_EXT), | ||
_ if path_extension == UNUSED_EXT => Some(UNUSED_EXT), | ||
_ if path_extension == MIGRATION_EXT => Some(MIGRATION_EXT), | ||
_ if path_extension == IDE_EXT => Some(IDE_EXT), | ||
_ => panic!("Unknown extension: {}", path_extension.to_string_lossy()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about making this a match? Or is path_extension
a path of some kinda and match
doesn't like that? i.e., what about something like
let test_kind = match path_extension {
MOVE_EXTENSION = NONE,
x @ (TEST_EXT | UNUSED_EXT | MIGRATION_EXT | IDE_EXT) => Some(x),
_ => panic!(...),
};
@@ -52,177 +66,236 @@ fn default_testing_addresses(flavor: Flavor) -> BTreeMap<String, NumericalAddres | |||
.collect() | |||
} | |||
|
|||
fn move_check_testsuite(path: &Path) -> datatest_stable::Result<()> { | |||
// fn move_check_testsuite(path: &Path) -> datatest_stable::Result<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can delete?
let p; | ||
let test_name = { | ||
p = path.with_extension(""); | ||
assert!(p.extension().is_none()); | ||
p.file_name().unwrap().to_string_lossy() | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is equivalent to
let test_name = path.file_stem().unwrap().to_string_lossy().as_ref();
and that might be a bit cleaner?
Description
Test plan
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.