Skip to content

Commit

Permalink
parse tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Jun 15, 2024
1 parent bd898ff commit 1d5e20d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions crates/state/tests/parse_highlight.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
use freya_engine::prelude::*;
use freya_node_state::{
HighlightMode,
Parse,
};

#[test]
fn parse_expanded_highlight_mode() {
let expanded = HighlightMode::parse("expanded");
assert_eq!(expanded, Ok(HighlightMode::Expanded));
}

#[test]
fn parse_fit_highlight_mode() {
let fit = HighlightMode::parse("fit");
assert_eq!(fit, Ok(HighlightMode::Fit));
}

#[test]
fn parse_fallback_highlight_mode() {
let fallback = HighlightMode::parse("Hello, World!");
assert_eq!(fallback, Ok(HighlightMode::Fit));
}

0 comments on commit 1d5e20d

Please sign in to comment.