4 #include <objc/runtime.h>
5 #include <objc/objc-internal.h>
6 #import <Foundation/NSObject.h>
11 SerialNumber() : _number(42) {}
12 SerialNumber(const SerialNumber &number) : _number(number._number + 1) {}
13 SerialNumber &operator=(const SerialNumber &number) { _number = number._number + 1; return *this; }
15 int operator==(const SerialNumber &number) { return _number == number._number; }
16 int operator!=(const SerialNumber &number) { return _number != number._number; }
19 @interface TestAtomicProperty : NSObject {
22 @property(atomic) SerialNumber number;
25 @implementation TestAtomicProperty
35 TestAtomicProperty *test = [TestAtomicProperty new];
37 testassert(test.number != number);