Skip to content

Commit

Permalink
Test compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
AngusGMorrison committed Nov 20, 2023
1 parent 2b5630a commit 66e92c4
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions crates/lox_core/src/marked_bodies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,27 @@ impl MeanLongitudeOfAscendingNode for Moon<MHB2000> {
}
}

/// 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<T> {
fn default() -> Self {
Self {
_convention: PhantomData,
}
impl Body for Moon<T> {
fn naif_id() -> i32 {
301
}

fn name() -> &'static str {
"Moon"
}
}

fn example_usage() {
let iers2003_mean_long = Moon::<IERS2003>.mean_longitude_of_ascending_node();
let mhb2000_mean_long = Moon::<MHB2000>.mean_longitude_of_ascending_node();
}

#[cfg(test)]
mod tests {
#[test]
fn test_example_usage_compiles() {
super::example_usage();
}
}

0 comments on commit 66e92c4

Please sign in to comment.