@@ -19,7 +19,7 @@ mod tests {
1919 use approx:: assert_relative_eq;
2020 use const_format:: concatcp;
2121
22- use crate :: compile:: { CellArg , CompileInput , compile } ;
22+ use crate :: compile:: { compile , CellArg , CompileInput } ;
2323 const EPSILON : f64 = 1e-10 ;
2424
2525 const EXAMPLES_DIR : & str = concat ! ( env!( "CARGO_MANIFEST_DIR" ) , "/../../examples" ) ;
@@ -672,15 +672,24 @@ mod tests {
672672 CompileInput {
673673 cell : & [ "top" ] ,
674674 args : Vec :: new ( ) ,
675- lyp_file : & PathBuf :: from ( BASIC_LYP ) ,
675+ lyp_file : & PathBuf :: from ( SKY130_LYP ) ,
676676 } ,
677677 ) ;
678678 println ! ( "{cells:#?}" ) ;
679+
680+ let work_dir = PathBuf :: from ( env ! ( "CARGO_MANIFEST_DIR" ) ) . join ( "build/argon_text" ) ;
681+ cells
682+ . to_gds (
683+ GdsMap :: from_lyp ( SKY130_LYP ) . expect ( "failed to create GDS map" ) ,
684+ work_dir. join ( "layout.gds" ) ,
685+ )
686+ . expect ( "Failed to write to GDS" ) ;
687+
679688 let cells = cells. unwrap_valid ( ) ;
680689 let cell = & cells. cells [ & cells. top ] ;
681- assert_eq ! ( cell. objects. len( ) , 1 ) ;
690+ assert_eq ! ( cell. objects. len( ) , 2 ) ;
682691 let t = cell. objects . iter ( ) . find_map ( |( _, v) | v. get_text ( ) ) . unwrap ( ) ;
683- assert_eq ! ( t. layer, "met1" ) ;
692+ assert_eq ! ( t. layer, "met1.label " ) ;
684693 assert_eq ! ( t. text, "mytext" ) ;
685694 assert_relative_eq ! ( t. x, 0. , epsilon = EPSILON ) ;
686695 assert_relative_eq ! ( t. y, 10. , epsilon = EPSILON ) ;
0 commit comments