mirror of
https://codeberg.org/icewind/vdf-reader.git
synced 2026-06-03 18:14:07 +02:00
boxed arrays
This commit is contained in:
parent
778696590a
commit
d54e44b51d
7 changed files with 143 additions and 6 deletions
|
|
@ -7,6 +7,11 @@ use vdf_reader::from_str;
|
|||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
enum Expected {
|
||||
Types {
|
||||
fixed_array: [u8; 3],
|
||||
flex_array: Vec<f32>,
|
||||
tuple: (bool, u8),
|
||||
},
|
||||
LightmappedGeneric {
|
||||
#[serde(rename = "$baseTexture")]
|
||||
base_texture: String,
|
||||
|
|
@ -152,8 +157,10 @@ struct GameList {
|
|||
#[test_case("tests/data/concrete.vmt")]
|
||||
#[test_case("tests/data/messy.vdf")]
|
||||
#[test_case("tests/data/DialogConfigOverlay_1280x720.vdf")]
|
||||
#[test_case("tests/data/serde_array_type.vdf")]
|
||||
#[test_case("tests/errors/concrete.vmt")]
|
||||
#[test_case("tests/errors/novalue.vdf")]
|
||||
#[test_case("tests/errors/serde_array_type.vdf")]
|
||||
fn test_serde(path: &str) {
|
||||
let raw = read_to_string(path).unwrap();
|
||||
match from_str::<Expected>(&raw) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue