From 88d2ed9e935d5a6a0c71ac0752c855ed89cf41c1 Mon Sep 17 00:00:00 2001 From: Martin Carlberg Date: Mon, 14 Apr 2014 18:39:34 +0200 Subject: [PATCH] Fixed: Forgot to commit the files for the new test case --- .../OutputTests/Messages/self-as-receiver.j | 15 +++++++++++++++ .../OutputTests/Messages/self-as-receiver.js | 11 +++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Tests/Objective-J/Preprocessor/OutputTests/Messages/self-as-receiver.j create mode 100644 Tests/Objective-J/Preprocessor/OutputTests/Messages/self-as-receiver.js diff --git a/Tests/Objective-J/Preprocessor/OutputTests/Messages/self-as-receiver.j b/Tests/Objective-J/Preprocessor/OutputTests/Messages/self-as-receiver.j new file mode 100644 index 000000000..1d339fcc3 --- /dev/null +++ b/Tests/Objective-J/Preprocessor/OutputTests/Messages/self-as-receiver.j @@ -0,0 +1,15 @@ +@implementation MyClass + +- (id)mySelector { + [self init]; + self = nil; + [self init]; +} + +- (id)mySelector2 { + [self init]; + eval("self = null;"); + [self init]; +} + +@end diff --git a/Tests/Objective-J/Preprocessor/OutputTests/Messages/self-as-receiver.js b/Tests/Objective-J/Preprocessor/OutputTests/Messages/self-as-receiver.js new file mode 100644 index 000000000..561ad60cb --- /dev/null +++ b/Tests/Objective-J/Preprocessor/OutputTests/Messages/self-as-receiver.js @@ -0,0 +1,11 @@ +var the_class=objj_allocateClassPair(Nil,"MyClass"),meta_class=the_class.isa; +objj_registerClassPair(the_class); +class_addMethods(the_class,[new objj_method(sel_getUid("mySelector"),function $MyClass__mySelector(_1,_2){ +_1.isa.objj_msgSend0(_1,"init"); +_1=nil; +(_1==null?null:_1.isa.objj_msgSend0(_1,"init")); +},["id"]),new objj_method(sel_getUid("mySelector2"),function $MyClass__mySelector2(_3,_4){ +_3.isa.objj_msgSend0(_3,"init"); +eval("self = null;"); +(_3==null?null:_3.isa.objj_msgSend0(_3,"init")); +},["id"])]); \ No newline at end of file