File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/libraries/System.Memory/tests/MemoryMarshal Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -107,13 +107,13 @@ public static void ReadOnlySpanGetReferenceAndReadInteger()
107107 Assert . Equal ( BitConverter . IsLittleEndian ?
108108 0x65_00_68 :
109109 0x68_00_65 ,
110- Unsafe . As < byte , int > ( ref Unsafe . Add ( ref Unsafe . As < char , byte > (
110+ Unsafe . ReadUnaligned < int > ( ref Unsafe . Add ( ref Unsafe . As < char , byte > (
111111 ref MemoryMarshal . GetReference ( "hello world 1" . AsSpan ( ) ) ) , 0 ) ) ) ;
112112
113113 Assert . Equal ( BitConverter . IsLittleEndian ?
114114 0x6F_00_6C_00_6C_00_65_00 :
115- 0x00_65_00_6C_00_6C_00_6F ,
116- Unsafe . As < byte , long > ( ref Unsafe . Add ( ref Unsafe . As < char , byte > (
115+ 0x68_00_65_00_6C_00_6C_00 ,
116+ Unsafe . ReadUnaligned < long > ( ref Unsafe . Add ( ref Unsafe . As < char , byte > (
117117 ref MemoryMarshal . GetReference ( "hello world 2" . AsSpan ( ) ) ) , 1 ) ) ) ;
118118 }
119119 }
You can’t perform that action at this time.
0 commit comments