summaryrefslogtreecommitdiff
path: root/src/parse/tests.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-01-09 21:35:36 +0100
committerLaurenz <laurmaedje@gmail.com>2021-01-09 21:35:36 +0100
commit3b2a28ca8edf61cb1376a095be36c7d006c92d76 (patch)
treec64cdaed32f8f45810f09ba8cfcf296971c21dff /src/parse/tests.rs
parent8275b186ba75b5e75a4108105c1ea3bfdbe6ada2 (diff)
Add angle data type 📐
Diffstat (limited to 'src/parse/tests.rs')
-rw-r--r--src/parse/tests.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parse/tests.rs b/src/parse/tests.rs
index 701d2a73..833d6661 100644
--- a/src/parse/tests.rs
+++ b/src/parse/tests.rs
@@ -5,7 +5,7 @@ use std::fmt::Debug;
use super::parse;
use crate::color::RgbaColor;
use crate::diag::{Diag, Level, Pass};
-use crate::geom::Unit;
+use crate::geom::LengthUnit;
use crate::syntax::*;
use BinOp::*;
@@ -549,7 +549,7 @@ fn test_parse_expressions() {
t!(r#"{"x"+"y"}"# Block(Binary(Str("x"), Add, Str("y"))));
t!("{1-2}" Block(Binary(Int(1), Sub, Int(2))));
t!("{a * b}" Block(Binary(Id("a"), Mul, Id("b"))));
- t!("{12pt/.4}" Block(Binary(Length(12.0, Unit::Pt), Div, Float(0.4))));
+ t!("{12pt/.4}" Block(Binary(Length(12.0, LengthUnit::Pt), Div, Float(0.4))));
// Associativity.
t!("{1+2+3}" Block(Binary(Binary(Int(1), Add, Int(2)), Add, Int(3))));
@@ -593,8 +593,8 @@ fn test_parse_values() {
t!("{1.0e-4}" Block(Float(1e-4)));
t!("{3.15}" Block(Float(3.15)));
t!("{50%}" Block(Percent(50.0)));
- t!("{4.5cm}" Block(Length(4.5, Unit::Cm)));
- t!("{12e1pt}" Block(Length(12e1, Unit::Pt)));
+ t!("{4.5cm}" Block(Length(4.5, LengthUnit::Cm)));
+ t!("{12e1pt}" Block(Length(12e1, LengthUnit::Pt)));
// Strings.
t!(r#"{"hi"}"# Block(Str("hi")));