@@ -11,44 +11,7 @@ use std::fmt;
11
11
12
12
use anyhow:: { Context , bail, ensure} ;
13
13
14
- use crate :: { BaseName , Float , Identifier , Int , MaybeOverride , SpecialCase , TestResult } ;
15
-
16
- /// Context passed to [`CheckOutput`].
17
- #[ derive( Clone , Debug , PartialEq , Eq ) ]
18
- pub struct CheckCtx {
19
- /// Allowed ULP deviation
20
- pub ulp : u32 ,
21
- pub fn_ident : Identifier ,
22
- pub base_name : BaseName ,
23
- /// Function name.
24
- pub fn_name : & ' static str ,
25
- /// Source of truth for tests.
26
- pub basis : CheckBasis ,
27
- }
28
-
29
- impl CheckCtx {
30
- /// Create a new check context, using the default ULP for the function.
31
- pub fn new ( fn_ident : Identifier , basis : CheckBasis ) -> Self {
32
- let mut ret = Self {
33
- ulp : 0 ,
34
- fn_ident,
35
- fn_name : fn_ident. as_str ( ) ,
36
- base_name : fn_ident. base_name ( ) ,
37
- basis,
38
- } ;
39
- ret. ulp = crate :: default_ulp ( & ret) ;
40
- ret
41
- }
42
- }
43
-
44
- /// Possible items to test against
45
- #[ derive( Clone , Debug , PartialEq , Eq ) ]
46
- pub enum CheckBasis {
47
- /// Check against Musl's math sources.
48
- Musl ,
49
- /// Check against infinite precision (MPFR).
50
- Mpfr ,
51
- }
14
+ use crate :: { CheckCtx , Float , Int , MaybeOverride , SpecialCase , TestResult } ;
52
15
53
16
/// Implement this on types that can generate a sequence of tuples for test input.
54
17
pub trait GenerateInput < TupleArgs > {
0 commit comments