Removed all code that uses OpenGL from Image.
[io/quag.git] / addons / CFFI / tests / DataTypeTest.io
blobffa737e79e9a00a48b7ea62f0a3173b75da77212
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.
4 */
6 CFFI
8 DataTypeTest := UnitTest clone do(
9 testValue := method(
10 appendProto(Types)
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)