@@ -23,48 +23,48 @@ void TestFormatMissingArgument()
2323 // GOOD: All arguments supplied to params
2424 String . Format ( "{0} {1} {2} {3}" , 0 , 1 , 2 , 3 ) ;
2525
26- helper ( "{1}" ) ; // $ Source
26+ helper ( "{1}" ) ; // $ Source=source1
2727 }
2828
2929 void helper ( string format )
3030 {
3131 // BAD: Missing {1}
32- String . Format ( format , 0 ) ; // $ Alert Sink
32+ String . Format ( format , 0 ) ; // $ Alert=source1 Sink=source1
3333 }
3434
3535 void TestCompositeFormatMissingArgument ( )
3636 {
3737 var format0 = CompositeFormat . Parse ( "{0}" ) ;
38- var format1 = CompositeFormat . Parse ( "{1}" ) ; // $ Source
38+ var format1 = CompositeFormat . Parse ( "{1}" ) ; // $ Source=source2
3939 var format01 = CompositeFormat . Parse ( "{0}{1}" ) ;
40- var format23 = CompositeFormat . Parse ( "{2}{3}" ) ; // $ Source
40+ var format23 = CompositeFormat . Parse ( "{2}{3}" ) ; // $ Source=source3
4141
4242 // GOOD: All args supplied
4343 String . Format < string > ( null , format0 , "" ) ;
4444
4545 // BAD: Missing {1}
46- String . Format < string > ( null , format1 , "" ) ; // $ Alert Sink
46+ String . Format < string > ( null , format1 , "" ) ; // $ Alert=source2 Sink=source2
4747
4848 // GOOD: All args supplied
4949 String . Format < string , string > ( null , format01 , "" , "" ) ;
5050
5151 // BAD: Missing {2} and {3}
52- String . Format < string , string > ( null , format23 , "" , "" ) ; // $ Alert Sink
52+ String . Format < string , string > ( null , format23 , "" , "" ) ; // $ Alert=source3 Sink=source3
5353
5454
5555 // GOOD: All arguments supplied
5656 sb . AppendFormat ( null , format0 , "" ) ;
5757 sb . AppendFormat < string > ( null , format0 , "" ) ;
5858
5959 // BAD: Missing {1}
60- sb . AppendFormat ( null , format1 , "" ) ; // $ Alert Sink
61- sb . AppendFormat < string > ( null , format1 , "" ) ; // $ Alert Sink
60+ sb . AppendFormat ( null , format1 , "" ) ; // $ Alert=source2 Sink=source2
61+ sb . AppendFormat < string > ( null , format1 , "" ) ; // $ Alert=source2 Sink=source2
6262
6363 // GOOD: All args supplied
6464 sb . AppendFormat < string , string > ( null , format01 , "" , "" ) ;
6565
6666 // BAD: Missing {2} and {3}
67- sb . AppendFormat < string , string > ( null , format23 , "" , "" ) ; // $ Alert Sink
67+ sb . AppendFormat < string , string > ( null , format23 , "" , "" ) ; // $ Alert=source3 Sink=source3
6868
6969
7070 var span = new Span < char > ( ) ;
@@ -74,14 +74,14 @@ void TestCompositeFormatMissingArgument()
7474 span . TryWrite < string > ( null , format0 , out _ , "" ) ;
7575
7676 // BAD: Missing {1}
77- span . TryWrite ( null , format1 , out _ , "" ) ; // $ Alert Sink
78- span . TryWrite < string > ( null , format1 , out _ , "" ) ; // $ Alert Sink
77+ span . TryWrite ( null , format1 , out _ , "" ) ; // $ Alert=source2 Sink=source2
78+ span . TryWrite < string > ( null , format1 , out _ , "" ) ; // $ Alert=source2 Sink=source2
7979
8080 // GOOD: All args supplied
8181 span . TryWrite < string , string > ( null , format01 , out _ , "" , "" ) ;
8282
8383 // BAD: Missing {2} and {3}
84- span . TryWrite < string , string > ( null , format23 , out _ , "" , "" ) ; // $ Alert Sink
84+ span . TryWrite < string , string > ( null , format23 , out _ , "" , "" ) ; // $ Alert=source3 Sink=source3
8585 }
8686
8787 object [ ] args ;
0 commit comments