[ConfigImpact] Add FP test due to anonymous class

Summary: An anonymous class name includes an index number, for example `AnonymousClass$2` represents that it is the 2nd anonymous class implemented in the `AnonymousClass` class.  Problem is that when we insert a new anonymous class, all index of anonymous class names below increase by one, which introduces incorrect comparison on reportdiff.

Reviewed By: ezgicicek

Differential Revision: D28568753

fbshipit-source-id: 2a6c576eb
master
Sungkeun Cho 4 years ago committed by Facebook GitHub Bot
parent 6df86dd892
commit a577d5fe0f

@ -6,8 +6,9 @@
# E2E test for differential of costs
TESTS_DIR = ../..
SOURCES = src/DiffExample.current.java src/DiffExample.previous.java
COPIED = src/DiffExample.java
SOURCES = src/DiffExample.current.java src/DiffExample.previous.java \
src/DiffAnonymousClass.current.java src/DiffAnonymousClass.previous.java
COPIED = src/DiffExample.java src/DiffAnonymousClass.java
CLEAN_EXTRA = $(COPIED) *.class
DIFFERENTIAL_ARGS = --enable-issue-type CONFIG_IMPACT
include $(TESTS_DIR)/differential-config-impact.make
@ -17,12 +18,14 @@ $(CURRENT_REPORT) $(PREVIOUS_REPORT): $(JAVA_DEPS)
$(CURRENT_REPORT):
$(QUIET)$(COPY) src/DiffExample.current.java src/DiffExample.java
$(QUIET)$(COPY) src/DiffAnonymousClass.current.java src/DiffAnonymousClass.java
$(QUIET)$(call silent_on_success,Testing Config Impact Differential: current,\
$(INFER_BIN) --no-filtering --config-impact-analysis-only --config-impact-data-file config_data.json -o $(CURRENT_DIR) \
-- $(JAVAC) -cp $(CLASSPATH) $(COPIED))
$(PREVIOUS_REPORT):
$(QUIET)$(COPY) src/DiffExample.previous.java src/DiffExample.java
$(QUIET)$(COPY) src/DiffAnonymousClass.previous.java src/DiffAnonymousClass.java
$(QUIET)$(call silent_on_success,Testing Config Impact Differential: previous,\
$(INFER_BIN) --no-filtering --config-impact-analysis-only --config-impact-data-file config_data.json -o $(PREVIOUS_DIR) \
-- $(JAVAC) -cp $(CLASSPATH) $(COPIED))

Loading…
Cancel
Save