add layout tests for custom native transmutable types
@@ -7,12 +7,17 @@ use rust_skia::{
C_SkFontStyle_equals
};
-#[derive(Copy, Clone, PartialEq, PartialOrd)]
#[repr(transparent)]
+#[derive(Copy, Clone, PartialEq, PartialOrd)]
pub struct FontStyleWeight(i32);
impl NativeTransmutable<i32> for FontStyleWeight {}
+#[test]
+fn test_font_style_weight_layout() {
+ FontStyleWeight::test_layout()
+}
+
#[allow(non_upper_case_globals)]
impl FontStyleWeight {
pub const Invisible: Self = Self(SkFontStyle_Weight::kInvisible_Weight as _);
@@ -28,11 +33,17 @@ impl FontStyleWeight {
pub const ExtraBlack: Self = Self(SkFontStyle_Weight::kExtraBlack_Weight as _);
}
+#[repr(transparent)]
#[derive(Copy, Clone, PartialEq, PartialOrd)]
pub struct FontStyleWidth(i32);
impl NativeTransmutable<i32> for FontStyleWidth {}
+#[test]
+fn test_font_style_width_layout() {
+ FontStyleWidth::test_layout()
+}
+
#[allow(non_upper_case_globals)]
impl FontStyleWidth {
pub const UltraCondensed: Self = Self(SkFontStyle_Width::kUltraCondensed_Width as _);
