File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/libraries/System.Memory/tests/MemoryMarshal Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -104,11 +104,15 @@ public static void ReadOnlySpanGetReferenceEmpty()
104104 [ Fact ]
105105 public static void ReadOnlySpanGetReferenceAndReadInteger ( )
106106 {
107- Assert . Equal ( 6619240 ,
107+ Assert . Equal ( BitConverter . IsLittleEndian ?
108+ 0x65_00_68 :
109+ 0x68_00_65 ,
108110 Unsafe . As < byte , int > ( ref Unsafe . Add ( ref Unsafe . As < char , byte > (
109- ref MemoryMarshal . GetReference ( "hello world 1" . AsSpan ( ) ) ) , 0 ) ) ) ;
111+ ref MemoryMarshal . GetReference ( "hello world 1" . AsSpan ( ) ) ) , 0 ) ) ) ;
110112
111- Assert . Equal ( 7998511687277765888 ,
113+ Assert . Equal ( BitConverter . IsLittleEndian ?
114+ 0x6F_00_6C_00_6C_00_65_00 :
115+ 0x00_65_00_6C_00_6C_00_6F ,
112116 Unsafe . As < byte , long > ( ref Unsafe . Add ( ref Unsafe . As < char , byte > (
113117 ref MemoryMarshal . GetReference ( "hello world 2" . AsSpan ( ) ) ) , 1 ) ) ) ;
114118 }
You can’t perform that action at this time.
0 commit comments