]> git.saurik.com Git - apple/objc4.git/blob - test/classversion.m
objc4-756.2.tar.gz
[apple/objc4.git] / test / classversion.m
1 // TEST_CONFIG
2
3 #include "test.h"
4 #include "testroot.i"
5 #include <objc/runtime.h>
6
7 int main()
8 {
9 Class cls = [TestRoot class];
10 testassert(class_getVersion(cls) == 0);
11 testassert(class_getVersion(object_getClass(cls)) > 5);
12 class_setVersion(cls, 100);
13 testassert(class_getVersion(cls) == 100);
14
15 testassert(class_getVersion(Nil) == 0);
16 class_setVersion(Nil, 100);
17
18 succeed(__FILE__);
19 }