mirror of
https://github.com/darlinghq/darling-objc4.git
synced 2024-11-26 21:50:26 +00:00
20 lines
415 B
Objective-C
20 lines
415 B
Objective-C
// 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__);
|
|
}
|