This repository was archived by the owner on Jun 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
System/Text/StringBuilder
mscorlib/systemlib/systemlib2 Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -548,7 +548,7 @@ HRESULT Library_corlib_native_System_String::FromCharArray( CLR_RT_StackFrame& s
548548 CLR_UINT32 len;
549549
550550 array = stack.Arg1 ().DereferenceArray (); if (!array) TINYCLR_SET_AND_LEAVE (S_OK);
551- len = array->m_numOfElements ; if (!len ) TINYCLR_SET_AND_LEAVE (S_OK);
551+ len = array->m_numOfElements ;
552552
553553 if (length == -1 ) length = len - startIndex;
554554
Original file line number Diff line number Diff line change @@ -129,8 +129,7 @@ public MFTestResults Test_1_RemoveTest_0()
129129
130130 bool result = false ;
131131
132- //result = stringBuilder.Clear().ToString() == string.Empty;
133- result = stringBuilder . Clear ( ) . ToString ( ) == null ;
132+ result = stringBuilder . Clear ( ) . ToString ( ) == string . Empty ;
134133
135134 if ( ! result )
136135 {
@@ -429,8 +428,7 @@ public MFTestResults Test_4_CapacityTest_0()
429428
430429 bool result = false ;
431430
432- //result = stringBuilder.ToString() == string.Empty;
433- result = stringBuilder . ToString ( ) == null ;
431+ result = stringBuilder . ToString ( ) == string . Empty ;
434432
435433 if ( ! result )
436434 {
Original file line number Diff line number Diff line change @@ -57,8 +57,12 @@ public MFTestResults Ctor_Test()
5757 char [ ] car2 = new char [ ] { ( char ) 0 , ( char ) 65 } ;
5858 string s = new string ( car2 ) ;
5959 testResult &= ( s == "\0 A" ) ;
60-
6160 Log . Comment ( "This was previously bug 20620" ) ;
61+
62+ Log . Comment ( "new char[0]" ) ;
63+ str = new string ( new char [ 0 ] ) ;
64+ testResult &= ( str == string . Empty ) ;
65+
6266 return ( testResult ? MFTestResults . Pass : MFTestResults . Fail ) ;
6367 }
6468 [ TestMethod ]
You can’t perform that action at this time.
0 commit comments