22 * SPDX-License-Identifier: MIT
33 * Copyright (c) "2025" . The DeepCausality Authors and Contributors. All Rights Reserved.
44 */
5- use std:: hash:: Hash ;
65use crate :: * ;
6+ use std:: hash:: Hash ;
77
88// A mock data structure used across multiple tests.
99#[ derive( Debug , Clone , Eq , Hash , Copy , PartialEq , Default ) ]
@@ -69,7 +69,6 @@ pub type TestModel = Model<
6969 FloatType ,
7070> ;
7171
72-
7372// A test processor to act as a destination for the generative output.
7473pub struct TestProcessor < D , S , T , ST , SYM , VS , VT >
7574where
8584 pub context_dest : Option < Context < D , S , T , ST , SYM , VS , VT > > ,
8685}
8786
87+ impl < D , S , T , ST , SYM , VS , VT > Default for TestProcessor < D , S , T , ST , SYM , VS , VT >
88+ where
89+ D : Default + Datable + Copy + Clone + Hash + Eq + PartialEq ,
90+ S : Spatial < VS > + Clone ,
91+ T : Temporal < VT > + Clone ,
92+ ST : SpaceTemporal < VS , VT > + Clone ,
93+ SYM : Symbolic + Clone ,
94+ VS : Clone ,
95+ VT : Clone ,
96+ {
97+ fn default ( ) -> Self {
98+ Self :: new ( )
99+ }
100+ }
101+
88102impl < D , S , T , ST , SYM , VS , VT > TestProcessor < D , S , T , ST , SYM , VS , VT >
89103where
90104 D : Default + Datable + Copy + Clone + Hash + Eq + PartialEq ,
@@ -105,7 +119,7 @@ where
105119
106120// Implement the processor trait so it can be used to test generators.
107121impl < D , S , T , ST , SYM , VS , VT , G > GenerativeProcessor < D , S , T , ST , SYM , VS , VT , G >
108- for TestProcessor < D , S , T , ST , SYM , VS , VT >
122+ for TestProcessor < D , S , T , ST , SYM , VS , VT >
109123where
110124 D : Default + Datable + Copy + Clone + Hash + Eq + PartialEq ,
111125 S : Spatial < VS > + Clone ,
@@ -139,16 +153,16 @@ pub type TestProcessorAlias = TestProcessor<
139153// Define a dummy generator for testing standalone outputs.
140154pub struct DummyGenerator ;
141155impl
142- Generatable <
143- MockData ,
144- EuclideanSpace ,
145- EuclideanTime ,
146- EuclideanSpacetime ,
147- BaseSymbol ,
148- FloatType ,
149- FloatType ,
150- DummyGenerator ,
151- > for DummyGenerator
156+ Generatable <
157+ MockData ,
158+ EuclideanSpace ,
159+ EuclideanTime ,
160+ EuclideanSpacetime ,
161+ BaseSymbol ,
162+ FloatType ,
163+ FloatType ,
164+ DummyGenerator ,
165+ > for DummyGenerator
152166{
153167 fn generate (
154168 & mut self ,
0 commit comments