1- #![ allow( dead_code) ]
2-
3- /// Testing helper macro. Allows to use generalized `FixedPoint` and `Layout` types in the test cases.
4- #[ macro_export]
1+ /// Allows to use generalized `FixedPoint` and `Layout` types in the test cases.
52macro_rules! test_fixed_point {
63 (
74 case ( $( $case_pattern: ident: $case_type: ty ) ,* $( , ) ?) => $case: block,
@@ -11,7 +8,7 @@ macro_rules! test_fixed_point {
118 ) => { {
129 macro_rules! impl_test_case {
1310 ( ) => {
14- fn test_case( $( $case_pattern: $case_type ) ,* ) -> $crate:: macros :: TestCaseResult {
11+ fn test_case( $( $case_pattern: $case_type ) ,* ) -> $crate:: TestCaseResult {
1512 $case
1613 Ok ( ( ) )
1714 }
@@ -90,15 +87,15 @@ macro_rules! test_fixed_point {
9087 } ;
9188 ( @suite_passes { $( ( $( $args: expr ) * ) ) * } ) => {
9289 $(
93- $crate:: macros :: r#impl:: catch_and_augment( stringify!( $( $args ) ,* ) , || {
90+ $crate:: r#impl:: catch_and_augment( stringify!( $( $args ) ,* ) , || {
9491 test_case( $( $args ) ,* )
9592 } ) ?;
9693 ) *
9794 } ;
9895 ( @suite_fails { $( ( $( $args: expr ) * ) ) * } ) => {
9996 $(
100- $crate:: macros :: r#impl:: catch_and_augment( stringify!( $( $args ) ,* ) , || {
101- $crate:: macros :: r#impl:: assert_fails( || test_case( $( $args ) ,* ) ) ;
97+ $crate:: r#impl:: catch_and_augment( stringify!( $( $args ) ,* ) , || {
98+ $crate:: r#impl:: assert_fails( || test_case( $( $args ) ,* ) ) ;
10299 Ok ( ( ) )
103100 } ) ?;
104101 ) *
@@ -108,8 +105,8 @@ macro_rules! test_fixed_point {
108105use std:: fmt:: Display ;
109106
110107// Use a special error based on `Display` in order to support `nostd`.
111- pub ( crate ) type TestCaseResult = Result < ( ) , TestCaseError > ;
112- pub ( crate ) struct TestCaseError ( Box < dyn Display > ) ;
108+ type TestCaseResult = Result < ( ) , TestCaseError > ;
109+ struct TestCaseError ( Box < dyn Display > ) ;
113110
114111impl < E : Display + ' static > From < E > for TestCaseError {
115112 fn from ( error : E ) -> Self {
@@ -125,7 +122,7 @@ impl From<TestCaseError> for anyhow::Error {
125122}
126123
127124#[ cfg( not( feature = "std" ) ) ]
128- pub ( crate ) mod r#impl {
125+ mod r#impl {
129126 use anyhow:: Result ;
130127
131128 use super :: TestCaseResult ;
@@ -141,7 +138,7 @@ pub(crate) mod r#impl {
141138}
142139
143140#[ cfg( feature = "std" ) ]
144- pub ( crate ) mod r#impl {
141+ mod r#impl {
145142 use std:: panic:: { catch_unwind, AssertUnwindSafe } ;
146143
147144 use anyhow:: { anyhow, Context , Result } ;
@@ -180,3 +177,11 @@ pub(crate) mod r#impl {
180177 }
181178 }
182179}
180+
181+ // Tests
182+ mod const_ctor;
183+ mod convert;
184+ mod convert_f64;
185+ mod convert_str;
186+ mod ops;
187+ mod serde;
0 commit comments