diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-01-06 21:06:48 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-01-06 21:06:48 +0100 |
| commit | 59d811aeba4491d54d2b0220109fd21a8f838b9b (patch) | |
| tree | e3c22a86592252c157cb268404d5e176d60cac55 /src/eval/value.rs | |
| parent | 7b4d4d6002a9c3da8fafd912f3c7b2da617f19c0 (diff) | |
Inline literal enum into expression enum 🔀
Diffstat (limited to 'src/eval/value.rs')
| -rw-r--r-- | src/eval/value.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/eval/value.rs b/src/eval/value.rs index 50741987..708f4f04 100644 --- a/src/eval/value.rs +++ b/src/eval/value.rs @@ -487,6 +487,7 @@ macro_rules! impl_type { mod tests { use super::*; use crate::color::RgbaColor; + use crate::parse::parse; use crate::pretty::pretty; use crate::syntax::Node; @@ -496,7 +497,7 @@ mod tests { } #[test] - fn test_pretty_print_values() { + fn test_pretty_print_simple_values() { test_pretty(Value::None, "none"); test_pretty(false, "false"); test_pretty(12.4, "12.4"); @@ -521,8 +522,8 @@ mod tests { // Dictionary. let mut dict = BTreeMap::new(); dict.insert("one".into(), Value::Int(1)); - dict.insert("two".into(), Value::Int(2)); + dict.insert("two".into(), Value::Content(parse("[f]").output)); test_pretty(BTreeMap::new(), "(:)"); - test_pretty(dict, "(one: 1, two: 2)"); + test_pretty(dict, "(one: 1, two: [f])"); } } |
