mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-10 00:48:45 +00:00
Fixed: The compiler might inline the 'message send' call so we do it manually in these test cases.
This commit is contained in:
1 parent
6c49116c68
commit
5b99757a0d
1 file changed
+9
-5
@@ -45,17 +45,19 @@ objj_test_decorator = function(msgSend)
|
||||
{
|
||||
objj_msgSend_decorate(objj_test_decorator);
|
||||
var a = [TestClass0 new];
|
||||
[self assert:[a intify:3] equals:6];
|
||||
// The compiler might inline the 'message send' call so we do it manually here
|
||||
[self assert:a.isa.objj_msgSend1(a, "intify:", 3) /*[a intify:3]*/ equals:6];
|
||||
[self assert:SEEN_MESSAGES equals:[[a, @selector(intify:)]]];
|
||||
}
|
||||
|
||||
- (void)test_objj_msgSend_decorate_should_replace_fast_msgSend_for_initialised_class
|
||||
{
|
||||
var a = [TestClass1 new];
|
||||
[a intify:5];
|
||||
a.isa.objj_msgSend1(a, "intify:", 5) /*[a intify:5]*/;
|
||||
|
||||
objj_msgSend_decorate(objj_test_decorator);
|
||||
[self assert:[a intify:3] equals:6];
|
||||
// The compiler might inline the 'message send' call so we do it manually here
|
||||
[self assert:a.isa.objj_msgSend1(a, "intify:", 3) /*[a intify:3]*/ equals:6];
|
||||
[self assert:SEEN_MESSAGES equals:[[a, @selector(intify:)]]];
|
||||
}
|
||||
|
||||
@@ -63,9 +65,11 @@ objj_test_decorator = function(msgSend)
|
||||
{
|
||||
objj_msgSend_decorate(objj_test_decorator);
|
||||
var a = [TestClass1 new];
|
||||
[self assert:[a intify:3] equals:6];
|
||||
// The compiler might inline the 'message send' call so we do it manually here
|
||||
[self assert:a.isa.objj_msgSend1(a, "intify:", 3) /*[a intify:3]*/ equals:6];
|
||||
objj_msgSend_reset();
|
||||
[self assert:[a intify:3] equals:6];
|
||||
// The compiler might inline the 'message send' call so we do it manually here
|
||||
[self assert:a.isa.objj_msgSend1(a, "intify:", 3) /*[a intify:3]*/ equals:6];
|
||||
[self assert:SEEN_MESSAGES equals:[[a, @selector(intify:)]]];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user