Include shared.rs in libm_test::op

These types from `libm-macros` provide a way to get information about an
operation at runtime, rather than only being encoded in the type system.
Include the file and reexport relevant types.
This commit is contained in:
Trevor Gross
2024-12-22 11:41:43 +00:00
parent 1069346b6d
commit fc4b88aecd
2 changed files with 9 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ mod test_traits;
pub use f8_impl::f8;
pub use libm::support::{Float, Int, IntTy, MinInt};
pub use num::{FloatExt, logspace};
pub use op::{BaseName, Identifier, MathOp, OpCFn, OpFTy, OpRustFn, OpRustRet};
pub use op::{BaseName, FloatTy, Identifier, MathOp, OpCFn, OpFTy, OpRustFn, OpRustRet, Ty};
pub use precision::{MaybeOverride, SpecialCase, default_ulp};
pub use test_traits::{CheckBasis, CheckCtx, CheckOutput, GenerateInput, Hex, TupleCall};

View File

@@ -13,8 +13,16 @@
//! - "Operation" / "Op": Something that relates a routine to a function or is otherwise higher
//! level. `Op` is also used as the name for generic parameters since it is terse.
use std::fmt;
pub use shared::{ALL_OPERATIONS, FloatTy, MathOpInfo, Ty};
use crate::{CheckOutput, Float, TupleCall};
mod shared {
include!("../../libm-macros/src/shared.rs");
}
/// An enum representing each possible symbol name (`sin`, `sinf`, `sinl`, etc).
#[libm_macros::function_enum(BaseName)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]