mirror of
https://github.com/servo/servo.git
synced 2025-09-30 16:49:16 +01:00
Properly use big endianness to parse font feature tags
This commit is contained in:
parent
7fc01437f4
commit
7eb7fc7582
2 changed files with 7 additions and 7 deletions
|
@ -10,7 +10,7 @@ use style_traits::ToCss;
|
|||
|
||||
#[test]
|
||||
fn font_feature_settings_should_parse_properly() {
|
||||
use byteorder::{ReadBytesExt, NativeEndian};
|
||||
use byteorder::{ReadBytesExt, BigEndian};
|
||||
use std::io::Cursor;
|
||||
|
||||
let normal = parse_longhand!(font_feature_settings, "normal");
|
||||
|
@ -20,8 +20,8 @@ fn font_feature_settings_should_parse_properly() {
|
|||
let mut a_d_bytes = Cursor::new(b"abcd");
|
||||
let mut e_h_bytes = Cursor::new(b"efgh");
|
||||
|
||||
let abcd = a_d_bytes.read_u32::<NativeEndian>().unwrap();
|
||||
let efgh = e_h_bytes.read_u32::<NativeEndian>().unwrap();
|
||||
let abcd = a_d_bytes.read_u32::<BigEndian>().unwrap();
|
||||
let efgh = e_h_bytes.read_u32::<BigEndian>().unwrap();
|
||||
|
||||
let on = parse_longhand!(font_feature_settings, "\"abcd\" on");
|
||||
let on_computed = computed_value::T::Tag(vec![
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue