File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
lib/ModelingToolkitBase/test Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 388388 # as opposed to `output.u ~ input.u`
389389 @test isequal (eq, comp1. input. u ~ comp2. output. u)
390390end
391+
392+ @testset " Source information propagation through `expand_connections`" begin
393+ @named rc_model = RCModel ()
394+ sys, source_info = expand_connections (rc_model, Val (true ))
395+ @test source_info. eqs_source == [
396+ [:rc_model , :resistor ],
397+ [:rc_model , :resistor ],
398+ [:rc_model , :resistor ],
399+ [:rc_model , :resistor ],
400+ [:rc_model , :capacitor ],
401+ [:rc_model , :capacitor ],
402+ [:rc_model , :capacitor ],
403+ [:rc_model , :capacitor ],
404+ [:rc_model , :shape ],
405+ [:rc_model , :source ],
406+ [:rc_model , :source ],
407+ [:rc_model , :source ],
408+ [:rc_model , :source ],
409+ [:rc_model , :ground ],
410+ Symbol[],
411+ Symbol[],
412+ Symbol[],
413+ Symbol[],
414+ Symbol[],
415+ Symbol[],
416+ Symbol[],
417+ Symbol[]
418+ ]
419+ is_connect_truth = falses (22 )
420+ is_connect_truth[end - 7 : end ] .= true
421+ @test source_info. is_connection_equation == is_connect_truth
422+ end
You can’t perform that action at this time.
0 commit comments