1 /* CFFI - An Io interface to C
2 Copyright (c) 2006 Trevor Fancher. All rights reserved.
3 All code licensed under the New BSD license.
8 DataTypeTest
:= UnitTest
clone do(
12 assertEquals("c", Char
setValue("c") value
)
13 assertEquals("c", UChar
setValue("c") value
)
14 assertEquals(-15, Short
setValue(-15) value
)
15 assertEquals(15, UShort
setValue(15) value
)
16 assertEquals(-187, Int
setValue(-187) value
)
17 assertEquals(187, UInt
setValue(187) value
)
18 assertEquals(-9473, Long
setValue(-9473) value
)
19 assertEquals(9473, ULong
setValue(9473) value
)
20 assertEquals(-7.65434, Double
setValue(-7.65434) value
)
21 assertEquals("abc", CString
setValue("abc") value
)