mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-27 04:44:30 +00:00
Get resolve_references test passing
This commit is contained in:
parent
caf0f0e428
commit
2392075467
2 changed files with 17 additions and 18 deletions
|
@ -291,6 +291,8 @@ impl Tree {
|
|||
if let Some(base) = root.get(base)? {
|
||||
if base.is_resolved() {
|
||||
resolved_base = Some(base);
|
||||
} else {
|
||||
made_progress |= base.resolve_subtree(root, unresolved)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -409,19 +411,21 @@ mod test {
|
|||
assert_eq!(
|
||||
resolve_references(json).unwrap(),
|
||||
serde_json::json!({
|
||||
"e": {
|
||||
"f": "1",
|
||||
"x": "1"
|
||||
},
|
||||
"a": {
|
||||
"x": "1"
|
||||
},
|
||||
"b": {
|
||||
"c": {
|
||||
"x": "1"
|
||||
},
|
||||
"d": "1"
|
||||
}})
|
||||
"a": {
|
||||
"x": "1"
|
||||
},
|
||||
"b": {
|
||||
"c": {
|
||||
"x": "1"
|
||||
},
|
||||
"d": "1"
|
||||
},
|
||||
"e": {
|
||||
"extends": "$a",
|
||||
"f": "1",
|
||||
"x": "1"
|
||||
},
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -183,11 +183,6 @@ mod tests {
|
|||
let registry = ThemeRegistry::new(assets, cx.font_cache().clone());
|
||||
let theme_data = registry.load("light", true).unwrap();
|
||||
|
||||
println!(
|
||||
"{}",
|
||||
serde_json::to_string_pretty(theme_data.as_ref()).unwrap()
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
theme_data.as_ref(),
|
||||
&serde_json::json!({
|
||||
|
|
Loading…
Reference in a new issue