File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
deep_causality/src/utils_test Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change 9393 SYM : Symbolic + Clone ,
9494 VS : Clone ,
9595 VT : Clone ,
96- {
96+ {
9797 fn default ( ) -> Self {
9898 Self :: new ( )
9999 }
@@ -192,3 +192,29 @@ impl
192192 Ok ( GenerativeOutput :: NoOp )
193193 }
194194}
195+
196+ #[ cfg( test) ]
197+ mod tests {
198+ use super :: * ;
199+
200+ #[ test]
201+ fn test_dummy_generator_no_op ( ) {
202+ let mut generator = DummyGenerator ;
203+ let trigger = GenerativeTrigger :: ManualIntervention ( "test" . to_string ( ) ) ;
204+
205+ // Create a context of the correct type: TestContext (which is Context<MockData, ...>)
206+ let context: TestContext = TestContext :: with_capacity ( 1 , "Test Context" , 10 ) ;
207+
208+ let result = generator. generate ( & trigger, & context) ;
209+
210+ assert ! ( result. is_ok( ) ) ;
211+ match result. unwrap ( ) {
212+ GenerativeOutput :: NoOp => {
213+ // This is the expected outcome
214+ }
215+ _ => {
216+ panic ! ( "DummyGenerator should always return GenerativeOutput::NoOp" ) ;
217+ }
218+ }
219+ }
220+ }
You can’t perform that action at this time.
0 commit comments