use std::mem::size_of;

use super::{Document, Element, Error, Field, RawElement, RawField, RawStr, RawValue, Span, Value};

#[test]
#[cfg(target_pointer_width = "64")]
fn should_match_sizes() {
    assert_eq!(size_of::<Document<'_>>(), 72);
    assert_eq!(size_of::<Element<'_>>(), 64);
    assert_eq!(size_of::<Field<'_>>(), 72);
    assert_eq!(size_of::<Value<'_>>(), 32);

    assert_eq!(size_of::<RawElement<'_>>(), 56);
    assert_eq!(size_of::<RawField<'_>>(), 64);
    assert_eq!(size_of::<RawValue<'_>>(), 32);

    assert_eq!(size_of::<Error>(), 40);
    assert_eq!(size_of::<RawStr<'_>>(), 16);
    assert_eq!(size_of::<Span>(), 8);
}
