Get resolve_references test passing

This commit is contained in:
Max Brunsfeld 2021-09-15 17:49:51 -07:00
parent caf0f0e428
commit 2392075467
2 changed files with 17 additions and 18 deletions

View file

@ -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"
},
})
)
}

View file

@ -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!({