mamrhein / quantities.rs

Unit-safe computations with quantities.
BSD 3-Clause "New" or "Revised" License
25 stars 10 forks source link

Possible to fix unit tests? #2

Closed MarkSwanson closed 2 years ago

MarkSwanson commented 2 years ago

I'm having some trouble using some of the features (frequency). Maybe it's related to the unit tests that fail? (main branch: cargo test has 4 errors) ?

Fyi my problem is that the macro seems to be calling Quad::new() (AmountT::new) when it should be calling the Amnt!() macro. Because the Quad::new() doesn't work like the fpdec Decimal::new()... The rust compile errors sadly don't help at all when working with macros. Any suggestions on how to actually debug Rust macros?

Thanks!

mamrhein commented 2 years ago

Take a look at the expanded code. I'm using CLion with Rust plugin, which has a function for that. But you can give cargo expand a try.

mamrhein commented 2 years ago

Originator switched to another crate. So I'm closing this.