MCPcopy Create free account
hub / github.com/csskit/csskit / test_compact_dimension

Function test_compact_dimension

crates/css_lexer/src/source_cursor.rs:904–909  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

902
903 #[test]
904 fn test_compact_dimension() {
905 let c = Cursor::new(SourceOffset(0), Token::new_dimension(true, false, 4, 4, 0.8, 0));
906 let sc = SourceCursor::from(c, r"+0.8\70x");
907 assert_eq!(format!("{}", sc), r"+0.8\70x");
908 assert_eq!(format!("{}", sc.compact()), ".8px");
909 }
910
911 #[test]
912 fn test_compact_whitespace() {

Callers

nothing calls this directly

Calls 1

SourceOffsetClass · 0.85

Tested by

no test coverage detected