// This file is part of ICU4X. For terms of use, please see the file // called LICENSE at the top level of the ICU4X source tree // (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). use icu_datetime::{fields::components, fieldsets::serde::CompositeFieldSetSerde, options}; use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Fixture(pub Vec); #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Test { pub setups: Vec, pub values: Vec, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TestInput { pub locale: String, pub options: TestOptions, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TestOptions { pub length: Option, pub components: Option, pub semantic: Option, #[serde(rename = "hourCycle")] pub hour_cycle: Option, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TestOptionsLength { pub date: Option, pub time: Option, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub enum TestLength { #[serde(rename = "short")] Short, #[serde(rename = "medium")] Medium, #[serde(rename = "long")] Long, #[serde(rename = "full")] Full, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TestComponentsBag { pub era: Option, pub year: Option, pub month: Option, pub week: Option, pub day: Option, pub weekday: Option, pub hour: Option, pub minute: Option, pub second: Option, pub fractional_second: Option, pub time_zone_name: Option, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum TestHourCycle { H11, H12, H23, H24, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct PatternsFixture(pub Vec);