@@ -169,90 +169,6 @@ Component(
169169 ) ;
170170}
171171
172- #[ test]
173- fn component_infers_kicad_lib_fp_footprint_for_kicad_symbols ( ) {
174- let mut files = HashMap :: new ( ) ;
175-
176- let symbols_root = "/.pcb/cache/gitlab.com/kicad/libraries/kicad-symbols/9.0.3" ;
177- let footprints_root = "/.pcb/cache/gitlab.com/kicad/libraries/kicad-footprints/9.0.3" ;
178- let footprint_name = "TSSOP-8_4.4x3mm_P0.65mm" ;
179-
180- files. insert (
181- format ! ( "{symbols_root}/Amplifier_Current.kicad_sym" ) ,
182- single_pin_symbol ( & format ! ( "Package_SO:{footprint_name}" ) ) ,
183- ) ;
184- files. insert (
185- format ! ( "{footprints_root}/Package_SO.pretty/{footprint_name}.kicad_mod" ) ,
186- "(footprint \" TSSOP-8_4.4x3mm_P0.65mm\" )" . to_string ( ) ,
187- ) ;
188- files. insert (
189- "test.zen" . to_string ( ) ,
190- r#"
191- Component(
192- name = "U1",
193- symbol = Symbol(library = "@kicad-symbols/Amplifier_Current.kicad_sym", name = "Part"),
194- pins = {"P": Net("N")},
195- )
196- "#
197- . to_string ( ) ,
198- ) ;
199-
200- let mut root_deps = BTreeMap :: new ( ) ;
201- root_deps. insert (
202- "gitlab.com/kicad/libraries/kicad-symbols" . to_string ( ) ,
203- PathBuf :: from ( symbols_root) ,
204- ) ;
205- root_deps. insert (
206- "gitlab.com/kicad/libraries/kicad-footprints" . to_string ( ) ,
207- PathBuf :: from ( footprints_root) ,
208- ) ;
209-
210- let mut assets = HashMap :: new ( ) ;
211- assets. insert (
212- (
213- "gitlab.com/kicad/libraries/kicad-symbols" . to_string ( ) ,
214- "9.0.3" . to_string ( ) ,
215- ) ,
216- PathBuf :: from ( symbols_root) ,
217- ) ;
218- assets. insert (
219- (
220- "gitlab.com/kicad/libraries/kicad-footprints" . to_string ( ) ,
221- "9.0.3" . to_string ( ) ,
222- ) ,
223- PathBuf :: from ( footprints_root) ,
224- ) ;
225-
226- let result = eval_with_files_and_resolution ( files, "test.zen" , root_deps, assets) ;
227- assert ! (
228- result. is_success( ) ,
229- "{}" ,
230- result
231- . diagnostics
232- . iter( )
233- . map( |d| d. to_string( ) )
234- . collect:: <Vec <_>>( )
235- . join( "\n " )
236- ) ;
237-
238- let output = result. output . expect ( "expected eval output" ) ;
239- let module_tree = output. module_tree ( ) ;
240- let root_module = module_tree
241- . values ( )
242- . find ( |m| m. path ( ) . is_root ( ) )
243- . expect ( "expected root module" ) ;
244- let component = root_module
245- . components ( )
246- . find ( |c| c. name ( ) == "U1" )
247- . expect ( "expected U1 component" ) ;
248- assert_eq ! (
249- component. footprint( ) ,
250- format!(
251- "package://gitlab.com/kicad/libraries/kicad-footprints@9.0.3/Package_SO.pretty/{footprint_name}.kicad_mod"
252- )
253- ) ;
254- }
255-
256172#[ test]
257173fn component_infers_kicad_lib_fp_footprint_snapshot_happy_path ( ) {
258174 let mut files = HashMap :: new ( ) ;
0 commit comments