Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
sils committed Oct 27, 2016
1 parent 8c04611 commit f6892f7
Showing 1 changed file with 5 additions and 33 deletions.
38 changes: 5 additions & 33 deletions tests/java/InferBearTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,9 @@ class InferBad {
}
"""

good_objc_file = """
#import <Foundation/Foundation.h>
@interface Hello: NSObject
@property NSString* s;
@end
@implementation Hello
NSString* m() {
Hello* hello = nil;
return hello.s;
}
@end
"""

bad_objc_file = """
#import <Foundation/Foundation.h>
@interface Hello: NSObject
@property NSString* s;
@end
@implementation Hello
NSString* m() {
Hello* hello = nil;
return hello->_s;
}
@end
"""

good_c_file = """
#include <stdlib.h>
void test() {
int *s = NULL;
if (s != NULL) {
Expand Down Expand Up @@ -82,6 +54,6 @@ class InferBad {
tempfile_kwargs={"suffix": ".java"}, settings={'language': 'bullshit'})


InferBearObjCTest = verify_local_bear(
InferBear, valid_files=(good_objc_file,), invalid_files=(bad_objc_file,),
tempfile_kwargs={"suffix": ".m"}, settings={'language': 'objective-c'})
InferBearCTest = verify_local_bear(
InferBear, valid_files=(good_c_file,), invalid_files=(bad_c_file,),
tempfile_kwargs={"suffix": ".c"}, settings={'language': 'objective-c'})

0 comments on commit f6892f7

Please sign in to comment.