Skip to content

Commit

Permalink
new fuzzy test to show off shallow transparent stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Jul 6, 2023
1 parent 95fdb9a commit f946808
Show file tree
Hide file tree
Showing 10 changed files with 388 additions and 13 deletions.
13 changes: 9 additions & 4 deletions crates/re_types/definitions/rerun/testing/datatypes/fuzzy.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ namespace rerun.testing.datatypes;

// ---

table FlattenedScalar (transparent, order: 001) {
value: float (order: 1002);
table FlattenedScalar ("attr.rust.derive": "PartialEq", order: 001) {
value: float (order: 100);
}

table DeeplyFlattenedScalar (transparent, order: 001) {
value: FlattenedScalar (order: 1001, transparent);
value: FlattenedScalar (order: 100, transparent);
}

table VeryDeeplyFlattenedScalar (transparent, order: 001) {
value: DeeplyFlattenedScalar (order: 1000, transparent);
value: DeeplyFlattenedScalar (order: 100, transparent);
}

table SurprisinglyShallowScalar (transparent, order: 001) {
value: FlattenedScalar (required, order: 100);
}

table AffixFuzzer1 (
Expand All @@ -29,6 +33,7 @@ table AffixFuzzer1 (
many_strings_required: [string] (order: 105, required);
many_strings_optional: [string] (order: 106);
flattened_scalar: VeryDeeplyFlattenedScalar (order: 107, required, transparent);
almost_flattened_scalar: SurprisinglyShallowScalar (order: 108, required, transparent);
}

table AffixFuzzer2 (
Expand Down
2 changes: 1 addition & 1 deletion crates/re_types/source_hash.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a sha256 hash for all direct and indirect dependencies of this crate's build script.
# It can be safely removed at anytime to force the build script to run again.
# Check out build.rs to see how it's computed.
5993624755b4eb3334b5a05efa8af2fc9cb93074b6a56fdc85c91ff784721aad
d05383876b33ae3b108ceffac46e0292a0dbc2253e3e777028181b4ed338315f
99 changes: 99 additions & 0 deletions crates/re_types/src/components/fuzzy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ impl crate::Component for AffixFuzzer1 {
is_nullable: false,
metadata: [].into(),
},
Field {
name: "almost_flattened_scalar".to_owned(),
data_type: DataType::Struct(vec![Field {
name: "value".to_owned(),
data_type: DataType::Float32,
is_nullable: true,
metadata: [].into(),
}]),
is_nullable: false,
metadata: [].into(),
},
])
}

Expand Down Expand Up @@ -242,6 +253,17 @@ impl crate::Component for AffixFuzzer2 {
is_nullable: false,
metadata: [].into(),
},
Field {
name: "almost_flattened_scalar".to_owned(),
data_type: DataType::Struct(vec![Field {
name: "value".to_owned(),
data_type: DataType::Float32,
is_nullable: true,
metadata: [].into(),
}]),
is_nullable: false,
metadata: [].into(),
},
])
}

Expand Down Expand Up @@ -390,6 +412,17 @@ impl crate::Component for AffixFuzzer3 {
is_nullable: false,
metadata: [].into(),
},
Field {
name: "almost_flattened_scalar".to_owned(),
data_type: DataType::Struct(vec![Field {
name: "value".to_owned(),
data_type: DataType::Float32,
is_nullable: true,
metadata: [].into(),
}]),
is_nullable: false,
metadata: [].into(),
},
])
}

Expand Down Expand Up @@ -538,6 +571,17 @@ impl crate::Component for AffixFuzzer4 {
is_nullable: false,
metadata: [].into(),
},
Field {
name: "almost_flattened_scalar".to_owned(),
data_type: DataType::Struct(vec![Field {
name: "value".to_owned(),
data_type: DataType::Float32,
is_nullable: true,
metadata: [].into(),
}]),
is_nullable: false,
metadata: [].into(),
},
])
}

Expand Down Expand Up @@ -682,6 +726,17 @@ impl crate::Component for AffixFuzzer5 {
is_nullable: false,
metadata: [].into(),
},
Field {
name: "almost_flattened_scalar".to_owned(),
data_type: DataType::Struct(vec![Field {
name: "value".to_owned(),
data_type: DataType::Float32,
is_nullable: true,
metadata: [].into(),
}]),
is_nullable: false,
metadata: [].into(),
},
])
}

Expand Down Expand Up @@ -828,6 +883,17 @@ impl crate::Component for AffixFuzzer6 {
is_nullable: false,
metadata: [].into(),
},
Field {
name: "almost_flattened_scalar".to_owned(),
data_type: DataType::Struct(vec![Field {
name: "value".to_owned(),
data_type: DataType::Float32,
is_nullable: true,
metadata: [].into(),
}]),
is_nullable: false,
metadata: [].into(),
},
])
}

Expand Down Expand Up @@ -976,6 +1042,17 @@ impl crate::Component for AffixFuzzer7 {
is_nullable: false,
metadata: [].into(),
},
Field {
name: "almost_flattened_scalar".to_owned(),
data_type: DataType::Struct(vec![Field {
name: "value".to_owned(),
data_type: DataType::Float32,
is_nullable: true,
metadata: [].into(),
}]),
is_nullable: false,
metadata: [].into(),
},
]),
is_nullable: true,
metadata: [].into(),
Expand Down Expand Up @@ -1100,6 +1177,17 @@ impl crate::Component for AffixFuzzer7 {
is_nullable: false,
metadata: [].into(),
},
Field {
name: "almost_flattened_scalar".to_owned(),
data_type: DataType::Struct(vec![Field {
name: "value".to_owned(),
data_type: DataType::Float32,
is_nullable: true,
metadata: [].into(),
}]),
is_nullable: false,
metadata: [].into(),
},
]),
is_nullable: true,
metadata: [].into(),
Expand Down Expand Up @@ -1208,6 +1296,17 @@ impl crate::Component for AffixFuzzer7 {
is_nullable: false,
metadata: [].into(),
},
Field {
name: "almost_flattened_scalar".to_owned(),
data_type: DataType::Struct(vec![Field {
name: "value".to_owned(),
data_type: DataType::Float32,
is_nullable: true,
metadata: [].into(),
}]),
is_nullable: false,
metadata: [].into(),
},
]),
})
})
Expand Down
Loading

0 comments on commit f946808

Please sign in to comment.