darling-objc4/test/classversion.m

20 lines
415 B
Mathematica
Raw Normal View History

2020-06-09 14:23:25 +00:00
// TEST_CONFIG
#include "test.h"
#include "testroot.i"
#include <objc/runtime.h>
int main()
{
Class cls = [TestRoot class];
testassert(class_getVersion(cls) == 0);
testassert(class_getVersion(object_getClass(cls)) > 5);
class_setVersion(cls, 100);
testassert(class_getVersion(cls) == 100);
testassert(class_getVersion(Nil) == 0);
class_setVersion(Nil, 100);
succeed(__FILE__);
}