mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🔧 Set up Rust jobs in CI
This commit is contained in:
@@ -150,3 +150,21 @@ impl Shape {
|
||||
self.blend_mode = mode;
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
fn any_shape() -> Shape {
|
||||
Shape::new(Uuid::nil())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn add_fill_pushes_a_new_fill() {
|
||||
let mut shape = any_shape();
|
||||
assert_eq!(shape.fills.len(), 0);
|
||||
|
||||
shape.add_fill(Fill::Solid(Color::TRANSPARENT));
|
||||
assert_eq!(shape.fills.get(0), Some(&Fill::Solid(Color::TRANSPARENT)))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user