From 66e92c44278869a4a9585248d0ecc87cf53a962e Mon Sep 17 00:00:00 2001 From: AngusGMorrison Date: Mon, 20 Nov 2023 18:32:57 +0000 Subject: [PATCH] Test compilation --- crates/lox_core/src/marked_bodies.rs | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/crates/lox_core/src/marked_bodies.rs b/crates/lox_core/src/marked_bodies.rs index 78dbca30..53d08d91 100644 --- a/crates/lox_core/src/marked_bodies.rs +++ b/crates/lox_core/src/marked_bodies.rs @@ -34,12 +34,27 @@ impl MeanLongitudeOfAscendingNode for Moon { } } -/// And it's still perfectly possible to implement methods that don't care about the conventions +/// And it's still possible to implement methods that don't care about the conventions /// followed by the body. -impl Default for Moon { - fn default() -> Self { - Self { - _convention: PhantomData, - } +impl Body for Moon { + fn naif_id() -> i32 { + 301 + } + + fn name() -> &'static str { + "Moon" + } +} + +fn example_usage() { + let iers2003_mean_long = Moon::.mean_longitude_of_ascending_node(); + let mhb2000_mean_long = Moon::.mean_longitude_of_ascending_node(); +} + +#[cfg(test)] +mod tests { + #[test] + fn test_example_usage_compiles() { + super::example_usage(); } }