Skip to content

Commit

Permalink
test: Added orientation test
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Mar 25, 2018
1 parent c02861d commit 3463c9b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_protocol_v7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -938,3 +938,9 @@ fn test_thread_id_format() {
assert_eq!(serde_json::from_str::<v7::ThreadId>("0").unwrap(), v7::ThreadId::Int(0));
assert_eq!(serde_json::from_str::<v7::ThreadId>("\"0\"").unwrap(), v7::ThreadId::String("0".into()));
}

#[test]
fn test_orientation() {
assert_eq!(serde_json::to_string(&v7::Orientation::Landscape).unwrap(), "\"landscape\"");
assert_eq!(serde_json::to_string(&v7::Orientation::Portrait).unwrap(), "\"portrait\"");
}

0 comments on commit 3463c9b

Please sign in to comment.