[cost] Rename test files to enable arc lint & editor highlighting

Reviewed By: skcho

Differential Revision: D23812782

fbshipit-source-id: 832958985
master
Ezgi Çiçek 4 years ago committed by Facebook GitHub Bot
parent 15786e8f09
commit 6678455838

1
.gitignore vendored

@ -46,6 +46,7 @@ duplicates.txt
/infer/tests/build_systems/diff_*/src
/infer/tests/build_systems/differential_*/**/*.class
/infer/tests/build_systems/differential_*/**/Diff*.java
/infer/tests/build_systems/differential_*/**/Diff*.m
/infer/tests/build_systems/incremental_analysis_remove_file/src
/infer/tests/build_systems/incremental_analysis_cost_change/src
/infer/tests/build_systems/incremental_analysis_add_procedure/src

@ -6,8 +6,9 @@
# E2E test for differential of costs
TESTS_DIR = ../..
SOURCES = src/DiffExample.java.current src/DiffExample.java.previous src/DiffExampleUIThread.java.current src/DiffExampleUIThread.java.previous
CLEAN_EXTRA = src/Diff*.java *.class
SOURCES = src/DiffExample.current.java src/DiffExample.previous.java src/DiffExampleUIThread.current.java src/DiffExampleUIThread.previous.java
COPIED = src/DiffExample.java src/DiffExampleUIThread.java
CLEAN_EXTRA = $(COPIED) *.class
include $(TESTS_DIR)/differential.make
include $(TESTS_DIR)/java.make
INFERPRINT_ISSUES_FIELDS = \
@ -16,13 +17,13 @@ INFERPRINT_ISSUES_FIELDS = \
$(CURRENT_REPORT) $(PREVIOUS_REPORT): $(JAVA_DEPS)
$(CURRENT_REPORT):
$(QUIET)$(COPY) src/DiffExample.java.current src/DiffExample.java
$(QUIET)$(COPY) src/DiffExampleUIThread.java.current src/DiffExampleUIThread.java
$(QUIET)$(COPY) src/DiffExample.current.java src/DiffExample.java
$(QUIET)$(COPY) src/DiffExampleUIThread.current.java src/DiffExampleUIThread.java
$(QUIET)$(call silent_on_success,Testing Cost Differential: current,\
$(INFER_BIN) --no-filtering --cost-only -o $(CURRENT_DIR) -- $(JAVAC) -cp $(CLASSPATH) src/*.java)
$(INFER_BIN) --no-filtering --cost-only -o $(CURRENT_DIR) -- $(JAVAC) -cp $(CLASSPATH) $(COPIED))
$(PREVIOUS_REPORT):
$(QUIET)$(COPY) src/DiffExample.java.previous src/DiffExample.java
$(QUIET)$(COPY) src/DiffExampleUIThread.java.previous src/DiffExampleUIThread.java
$(QUIET)$(COPY) src/DiffExample.previous.java src/DiffExample.java
$(QUIET)$(COPY) src/DiffExampleUIThread.previous.java src/DiffExampleUIThread.java
$(QUIET)$(call silent_on_success,Testing Cost Differential: previous,\
$(INFER_BIN) --debug --no-filtering --cost-only -o $(PREVIOUS_DIR) -- $(JAVAC) -cp $(CLASSPATH) src/*.java)
$(INFER_BIN) --debug --no-filtering --cost-only -o $(PREVIOUS_DIR) -- $(JAVAC) -cp $(CLASSPATH) $(COPIED))

@ -6,7 +6,9 @@
# E2E test for differential of costs
TESTS_DIR = ../..
SOURCES = src/DiffBlock.m.current src/DiffBlock.m.previous
SOURCES = src/DiffBlock.current.m src/DiffBlock.previous.m
COPIED = src/DiffBlock.m
CLEAN_EXTRA = $(COPIED)
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS)
include $(TESTS_DIR)/differential.make
include $(TESTS_DIR)/objc.make
@ -16,11 +18,11 @@ INFERPRINT_ISSUES_FIELDS = \
$(CURRENT_REPORT) $(PREVIOUS_REPORT): $(OBJC_DEPS)
$(CURRENT_REPORT):
$(QUIET)$(COPY) src/DiffBlock.m.current src/DiffBlock.m
$(QUIET)$(COPY) src/DiffBlock.current.m src/DiffBlock.m
$(QUIET)$(call silent_on_success,Testing Cost Differential: current,\
$(INFER_BIN) --no-filtering --cost-only -o $(CURRENT_DIR) -- clang $(CLANG_OPTIONS) src/*.m)
$(INFER_BIN) --no-filtering --cost-only -o $(CURRENT_DIR) -- clang $(CLANG_OPTIONS) $(COPIED))
$(PREVIOUS_REPORT):
$(QUIET)$(COPY) src/DiffBlock.m.previous src/DiffBlock.m
$(QUIET)$(COPY) src/DiffBlock.previous.m src/DiffBlock.m
$(QUIET)$(call silent_on_success,Testing Cost Differential: previous,\
$(INFER_BIN) --debug --no-filtering --cost-only -o $(PREVIOUS_DIR) -- clang $(CLANG_OPTIONS) src/*.m)
$(INFER_BIN) --debug --no-filtering --cost-only -o $(PREVIOUS_DIR) -- clang $(CLANG_OPTIONS) $(COPIED))

@ -1,51 +0,0 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
@interface CallBlocks : NSObject
- (void)take_two_blocks:(NSInteger*)n
block1:(void (^)(NSInteger*))block1
block2:(void (^)(NSInteger*))block2;
@end
@implementation CallBlocks
- (id)init {
return self;
}
- (void)take_two_blocks:(NSInteger*)n
block1:(void (^)(NSInteger*))block1
block2:(void (^)(NSInteger*))block2 {
block1(n);
block2(n);
}
@end
@interface Handler : NSObject
@end
@implementation Handler
- (void (^)(NSString*))func_linear {
return ^(NSString* str) {
NSLog(@"Report error : %@ \n", str);
};
}
- (void)func_linear:(NSArray*)array {
for (id value in array) {
}
}
@end
int main() { return 0; }
Loading…
Cancel
Save