use owned ast and tokens in bench (#11598)

This commit is contained in:
Micha Reiser 2024-05-29 18:10:32 +02:00 committed by GitHub
parent e14096f0a8
commit 921bc15542
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 39 additions and 63 deletions

View file

@ -353,10 +353,12 @@ mod tests {
use insta::assert_debug_snapshot;
use serde::de::DeserializeOwned;
#[cfg(not(windows))]
use ruff_linter::registry::Linter;
use super::*;
#[cfg(not(windows))]
const VS_CODE_INIT_OPTIONS_FIXTURE: &str =
include_str!("../../resources/test/fixtures/settings/vs_code_initialization_options.json");
const GLOBAL_ONLY_INIT_OPTIONS_FIXTURE: &str =
@ -368,7 +370,8 @@ mod tests {
serde_json::from_str(content).expect("test fixture JSON should deserialize")
}
#[cfg_attr(not(windows), test)]
#[cfg(not(windows))]
#[test]
fn test_vs_code_init_options_deserialize() {
let options: InitializationOptions = deserialize_fixture(VS_CODE_INIT_OPTIONS_FIXTURE);
@ -553,7 +556,8 @@ mod tests {
"###);
}
#[cfg_attr(not(windows), test)]
#[cfg(not(windows))]
#[test]
fn test_vs_code_workspace_settings_resolve() {
let options = deserialize_fixture(VS_CODE_INIT_OPTIONS_FIXTURE);
let AllSettings {