File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
crates/cairo-lang-test-utils/src Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -102,12 +102,14 @@ pub fn dump_to_test_file(
102102 for ( test_name, test) in tests {
103103 let mut tag_strings = vec ! [ TAG_PREFIX . to_string( ) + & test_name] ;
104104 for ( tag, content) in test. attributes {
105- tag_strings. push (
106- TAG_PREFIX . to_string ( )
107- + & tag
108- + if content. is_empty ( ) { "" } else { "\n " }
109- + & content,
110- ) ;
105+ if tag != "test_name" {
106+ tag_strings. push (
107+ TAG_PREFIX . to_string ( )
108+ + & tag
109+ + if content. is_empty ( ) { "" } else { "\n " }
110+ + & content,
111+ ) ;
112+ }
111113 }
112114 test_strings. push ( tag_strings. join ( "\n \n " ) ) ;
113115 }
@@ -139,8 +141,11 @@ impl TestBuilder {
139141 }
140142
141143 fn set_test_name ( & mut self , line : String , line_num : usize ) {
142- self . current_test_name = Some ( line) ;
143- self . current_test = Some ( Test { attributes : OrderedHashMap :: default ( ) , line_num } ) ;
144+ self . current_test_name = Some ( line. clone ( ) ) ;
145+ self . current_test = Some ( Test {
146+ attributes : OrderedHashMap :: from ( [ ( "test_name" . to_string ( ) , line) ] ) ,
147+ line_num,
148+ } ) ;
144149 }
145150
146151 fn add_content_line ( & mut self , line : String ) {
You can’t perform that action at this time.
0 commit comments