106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
[[m valueForKey: @"classValue"] isEqual: m.class] &&
[[m valueForKey: @"class"] isEqual: m.class])
EXPECT_EXCEPTION(@"-[valueForKey:] with undefined key",
OFUndefinedKeyException, [m valueForKey: @"undefined"])
TEST(@"-[setValue:forKey:]",
R([m setValue: @"World"
forKey: @"objectValue"]) &&
R([m setValue: [OFObject class]
forKey: @"classValue"]) &&
[m.objectValue isEqual: @"World"] &&
[m.classValue isEqual: [OFObject class]])
EXPECT_EXCEPTION(@"-[setValue:forKey:] with undefined key",
OFUndefinedKeyException, [m setValue: @"x"
forKey: @"undefined"])
m.boolValue = 1;
m.charValue = 2;
m.shortValue = 3;
m.intValue = 4;
m.longValue = 5;
m.longLongValue = 6;
|
|
<
|
<
|
<
|
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
[[m valueForKey: @"classValue"] isEqual: m.class] &&
[[m valueForKey: @"class"] isEqual: m.class])
EXPECT_EXCEPTION(@"-[valueForKey:] with undefined key",
OFUndefinedKeyException, [m valueForKey: @"undefined"])
TEST(@"-[setValue:forKey:]",
R([m setValue: @"World" forKey: @"objectValue"]) &&
R([m setValue: [OFObject class] forKey: @"classValue"]) &&
[m.objectValue isEqual: @"World"] &&
[m.classValue isEqual: [OFObject class]])
EXPECT_EXCEPTION(@"-[setValue:forKey:] with undefined key",
OFUndefinedKeyException, [m setValue: @"x" forKey: @"undefined"])
m.boolValue = 1;
m.charValue = 2;
m.shortValue = 3;
m.intValue = 4;
m.longValue = 5;
m.longLongValue = 6;
|