Add tests of kmath-memory and make all the memory operations on all the platforms use little-endian byte order #163
@ -57,7 +57,6 @@ public interface MemoryReader {
|
|||||||
/**
|
/**
|
||||||
* Reads [Float] at certain [offset].
|
* Reads [Float] at certain [offset].
|
||||||
*/
|
*/
|
||||||
@Deprecated("readFloat and writeFloat functions work unexpectedly on JS platform, since because their results are widened when used. Consider using readDouble and writeDouble.")
|
|
||||||
public fun readFloat(offset: Int): Float
|
public fun readFloat(offset: Int): Float
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -114,7 +113,6 @@ public interface MemoryWriter {
|
|||||||
/**
|
/**
|
||||||
* Writes [Float] at certain [offset].
|
* Writes [Float] at certain [offset].
|
||||||
*/
|
*/
|
||||||
@Deprecated("readFloat and writeFloat functions work unexpectedly on JS platform, since because their results are widened when used. Consider using readDouble and writeDouble.")
|
|
||||||
public fun writeFloat(offset: Int, value: Float)
|
public fun writeFloat(offset: Int, value: Float)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,7 +50,6 @@ internal class MemoryTest {
|
|||||||
assertEquals(-50000333595959L, mem.read { readLong(16) })
|
assertEquals(-50000333595959L, mem.read { readLong(16) })
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("DEPRECATION")
|
|
||||||
@Test
|
@Test
|
||||||
fun rwFloat() {
|
fun rwFloat() {
|
||||||
val mem = Memory.allocate(64)
|
val mem = Memory.allocate(64)
|
||||||
|
Loading…
Reference in New Issue
Block a user