macro_rules! assert_runtime_groups_are_partitioned {
(
stored: { $( $variant:ident => $ty:path { $($meta:tt)* } ),+ $(,)? },
resource: { $( $rvariant:ident => $rty:path { $($rmeta:tt)* } ),+ $(,)? } $(,)?
) => {
fn a_world_holds<T: concinnity_core::ecs::RuntimeComponent>() {}
#[test]
fn the_components_namespace_is_the_stored_group() {
$( a_world_holds::<crate::components::$variant>(); )+
}
#[cfg(feature = "cook")]
fn the_cook_compiles<T: concinnity_core::ecs::ResourceAsset>() {}
#[cfg(feature = "cook")]
#[test]
fn the_cook_namespace_holds_the_compiled_resources() {
$( the_cook_compiles::<crate::cook::$rvariant>(); )+
}
};
}
concinnity_core::for_each_component!(assert_runtime_groups_are_partitioned);
#[cfg(feature = "cook")]
macro_rules! assert_the_build_only_group_is_reachable {
(build_only: { $( $bvariant:ident => $bty:path { $($bmeta:tt)* } ),+ $(,)? } $(,)?) => {
fn the_cook_expands<T: concinnity_cook::authoring::registry::BuildOnlyAsset>() {}
#[test]
fn the_cook_namespace_holds_the_expanded_types() {
$( the_cook_expands::<crate::cook::$bvariant>(); )+
}
};
}
#[cfg(feature = "cook")]
concinnity_cook::for_each_build_only_type!(assert_the_build_only_group_is_reachable);