diff --git a/.buckconfig b/.buckconfig index 42c021112..42665d85e 100644 --- a/.buckconfig +++ b/.buckconfig @@ -21,5 +21,7 @@ checkers = //infer/tests/endtoend/java/checkers:checkers tracing = //infer/tests/endtoend/java/tracing:tracing + linters = //infer/tests/endtoend:linters + [project] ignore = .git, .ml, .mli diff --git a/infer/tests/BUCK b/infer/tests/BUCK index 1fa063dec..054f4b751 100644 --- a/infer/tests/BUCK +++ b/infer/tests/BUCK @@ -1,43 +1,24 @@ java_test( - name='integration_tests', + name='c_tests', deps=[ - '//dependencies/java:java_libraries', - '//infer/tests/endtoend:objc_endtoend_tests', - '//infer/tests/frontend:objc_frontend_tests', - '//infer/tests/endtoend/c:infer', + '//infer/tests/endtoend:c_endtoend_tests', '//infer/tests/frontend:c_frontend_tests', - '//infer/tests/endtoend:cpp_endtoend_tests', - '//infer/tests/frontend:cpp_frontend_tests', - '//infer/tests/endtoend:objcpp_endtoend_tests', - '//infer/tests/frontend:objcpp_frontend_tests', - '//infer/tests/endtoend:java_endtoend_tests', ], - source='7', - target='7', -) - - -java_test( - name='objc_tests', - deps=[ - '//infer/tests/endtoend:objc_endtoend_tests', - '//infer/tests/frontend:objc_frontend_tests', - ], ) java_test( - name='c_tests', + name='cpp_tests', deps=[ - '//infer/tests/endtoend/c:infer', - '//infer/tests/frontend:c_frontend_tests', + '//infer/tests/endtoend:cpp_endtoend_tests', + '//infer/tests/frontend:cpp_frontend_tests', ], ) java_test( - name='cpp_tests', + name='objc_tests', deps=[ - '//infer/tests/endtoend:cpp_endtoend_tests', - '//infer/tests/frontend:cpp_frontend_tests', + '//infer/tests/endtoend:objc_endtoend_tests', + '//infer/tests/frontend:objc_frontend_tests', ], ) @@ -58,8 +39,3 @@ java_test( '//infer/tests:objcpp_tests', ], ) - -project_config( - src_target=':integration_tests', - src_roots=[ 'src' ], -) diff --git a/infer/tests/codetoanalyze/objc/warnings/assign_pointer.m b/infer/tests/codetoanalyze/objc/linters/assign_pointer.m similarity index 100% rename from infer/tests/codetoanalyze/objc/warnings/assign_pointer.m rename to infer/tests/codetoanalyze/objc/linters/assign_pointer.m diff --git a/infer/tests/codetoanalyze/objc/warnings/atomic_prop.m b/infer/tests/codetoanalyze/objc/linters/atomic_prop.m similarity index 100% rename from infer/tests/codetoanalyze/objc/warnings/atomic_prop.m rename to infer/tests/codetoanalyze/objc/linters/atomic_prop.m diff --git a/infer/tests/codetoanalyze/objc/errors/registered_observer/ViewController.m b/infer/tests/codetoanalyze/objc/linters/registered_observer/ViewController.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/registered_observer/ViewController.m rename to infer/tests/codetoanalyze/objc/linters/registered_observer/ViewController.m diff --git a/infer/tests/codetoanalyze/objc/errors/registered_observer/ViewController2.m b/infer/tests/codetoanalyze/objc/linters/registered_observer/ViewController2.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/registered_observer/ViewController2.m rename to infer/tests/codetoanalyze/objc/linters/registered_observer/ViewController2.m diff --git a/infer/tests/codetoanalyze/objc/errors/registered_observer/ViewController3.m b/infer/tests/codetoanalyze/objc/linters/registered_observer/ViewController3.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/registered_observer/ViewController3.m rename to infer/tests/codetoanalyze/objc/linters/registered_observer/ViewController3.m diff --git a/infer/tests/codetoanalyze/objc/warnings/strong_delegate.m b/infer/tests/codetoanalyze/objc/linters/strong_delegate.m similarity index 100% rename from infer/tests/codetoanalyze/objc/warnings/strong_delegate.m rename to infer/tests/codetoanalyze/objc/linters/strong_delegate.m diff --git a/infer/tests/codetoanalyze/objcpp/errors/blocks/block.mm b/infer/tests/codetoanalyze/objcpp/linters/cxx_reference_in_block/block.mm similarity index 100% rename from infer/tests/codetoanalyze/objcpp/errors/blocks/block.mm rename to infer/tests/codetoanalyze/objcpp/linters/cxx_reference_in_block/block.mm diff --git a/infer/tests/codetoanalyze/objcpp/frontend/global-var/B.mm b/infer/tests/codetoanalyze/objcpp/linters/global-var/B.mm similarity index 100% rename from infer/tests/codetoanalyze/objcpp/frontend/global-var/B.mm rename to infer/tests/codetoanalyze/objcpp/linters/global-var/B.mm diff --git a/infer/tests/endtoend/BUCK b/infer/tests/endtoend/BUCK index c1a2615dc..3b21756c0 100644 --- a/infer/tests/endtoend/BUCK +++ b/infer/tests/endtoend/BUCK @@ -13,78 +13,50 @@ tests_dependencies = [ '//infer/tests/codetoanalyze/java/tracing:tracing', ] -integration_tests = [ - '//infer/tests:integration_tests', - '//infer/tests:objc_tests', - '//infer/tests:c_tests', - '//infer/tests:cpp_tests', - '//infer/tests:objcpp_tests', -] - -# ############### ObjC tests endtoend ######################## -objc_test_sources = glob(['objc/**/*.java']) -objc_endtoend_test_deps = [] -for test_source in objc_test_sources: - target_name = test_source.replace("/", "_")[:-len(".java")] - objc_endtoend_test_deps.append(target_name) - - java_test( - name=target_name, - srcs=[test_source], - deps=tests_dependencies, - visibility=integration_tests, - source='7', - target='7', - ) +# ############### C endtoend tests ######################## +java_test( + name='c_endtoend_tests', + deps=[ + '//infer/tests/endtoend/c/infer:infer', + ], + visibility=[ + 'PUBLIC', + ], +) +# ############### ObjC endtoend tests ######################## java_test( - name='objc_endtoend_tests', - deps=[':' + x for x in objc_endtoend_test_deps], - visibility=integration_tests, + name='objc_endtoend_tests', + deps=[ + '//infer/tests/endtoend/objc/infer:infer', + '//infer/tests/endtoend/objc/linters:linters', + ], + visibility=[ + 'PUBLIC', + ], ) # ############### Cpp endtoend tests ######################## -objc_test_sources = glob(['cpp/**/*.java']) -objc_endtoend_test_deps = [] -for test_source in objc_test_sources: - target_name = test_source.replace("/", "_")[:-len(".java")] - objc_endtoend_test_deps.append(target_name) - - java_test( - name=target_name, - srcs=[test_source], - deps=tests_dependencies, - visibility=integration_tests, - source='7', - target='7', - ) - java_test( - name='cpp_endtoend_tests', - deps=[':' + x for x in objc_endtoend_test_deps], - visibility=integration_tests, + name='cpp_endtoend_tests', + deps=[ + '//infer/tests/endtoend/cpp/infer:infer', + ], + visibility=[ + 'PUBLIC', + ], ) # ############### ObjCpp endtoend tests ######################## -objc_test_sources = glob(['objcpp/**/*.java']) -objc_endtoend_test_deps = [] -for test_source in objc_test_sources: - target_name = test_source.replace("/", "_")[:-len(".java")] - objc_endtoend_test_deps.append(target_name) - - java_test( - name=target_name, - srcs=[test_source], - deps=tests_dependencies, - visibility=integration_tests, - source='7', - target='7', - ) - java_test( - name='objcpp_endtoend_tests', - deps=[':' + x for x in objc_endtoend_test_deps], - visibility=integration_tests, + name='objcpp_endtoend_tests', + deps=[ + '//infer/tests/endtoend/objcpp/infer:infer', + '//infer/tests/endtoend/objcpp/linters:linters', + ], + visibility=[ + 'PUBLIC', + ], ) # ############### Java endtoend tests ######################## @@ -98,5 +70,17 @@ java_test( '//infer/tests/endtoend/java/tracing:tracing', '//infer/tests/endtoend/java/comparison:comparison', ], - visibility=integration_tests, + visibility=[ + 'PUBLIC', + ], +) + +# ############### Linters tests ######################## + +java_test( + name='linters', + deps=[ + '//infer/tests/endtoend/objc/linters:linters', + '//infer/tests/endtoend/objcpp/linters:linters', + ], ) diff --git a/infer/tests/endtoend/c/AngelismTest.java b/infer/tests/endtoend/c/infer/AngelismTest.java similarity index 95% rename from infer/tests/endtoend/c/AngelismTest.java rename to infer/tests/endtoend/c/infer/AngelismTest.java index 2138f3ce3..c249bf8b8 100644 --- a/infer/tests/endtoend/c/AngelismTest.java +++ b/infer/tests/endtoend/c/infer/AngelismTest.java @@ -7,10 +7,9 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; -import static utils.matchers.ResultContainsLineNumbers.containsLines; import static utils.matchers.ResultContainsExactly.containsExactly; import org.junit.BeforeClass; diff --git a/infer/tests/endtoend/c/ArrayOutOfBoundsTest.java b/infer/tests/endtoend/c/infer/ArrayOutOfBoundsTest.java similarity index 98% rename from infer/tests/endtoend/c/ArrayOutOfBoundsTest.java rename to infer/tests/endtoend/c/infer/ArrayOutOfBoundsTest.java index 04ea82bef..0c514e343 100644 --- a/infer/tests/endtoend/c/ArrayOutOfBoundsTest.java +++ b/infer/tests/endtoend/c/infer/ArrayOutOfBoundsTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/c/AsmAngelismTest.java b/infer/tests/endtoend/c/infer/AsmAngelismTest.java similarity index 98% rename from infer/tests/endtoend/c/AsmAngelismTest.java rename to infer/tests/endtoend/c/infer/AsmAngelismTest.java index e8b6c8cc1..9d36d3a6a 100644 --- a/infer/tests/endtoend/c/AsmAngelismTest.java +++ b/infer/tests/endtoend/c/infer/AsmAngelismTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/c/AssertKeepBranchTest.java b/infer/tests/endtoend/c/infer/AssertKeepBranchTest.java similarity index 92% rename from infer/tests/endtoend/c/AssertKeepBranchTest.java rename to infer/tests/endtoend/c/infer/AssertKeepBranchTest.java index f45b43210..98fabfac5 100644 --- a/infer/tests/endtoend/c/AssertKeepBranchTest.java +++ b/infer/tests/endtoend/c/infer/AssertKeepBranchTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; @@ -15,15 +15,12 @@ import static utils.matchers.ResultContainsExactly.containsExactly; import com.google.common.collect.ImmutableList; import org.junit.BeforeClass; -import org.junit.ClassRule; import org.junit.Test; import java.io.IOException; -import utils.DebuggableTemporaryFolder; import utils.InferException; import utils.InferResults; -import utils.InferRunner; public class AssertKeepBranchTest { diff --git a/infer/tests/endtoend/c/AssertTest.java b/infer/tests/endtoend/c/infer/AssertTest.java similarity index 98% rename from infer/tests/endtoend/c/AssertTest.java rename to infer/tests/endtoend/c/infer/AssertTest.java index 2a13621b3..985addc86 100644 --- a/infer/tests/endtoend/c/AssertTest.java +++ b/infer/tests/endtoend/c/infer/AssertTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/c/AssertionFailureTest.java b/infer/tests/endtoend/c/infer/AssertionFailureTest.java similarity index 98% rename from infer/tests/endtoend/c/AssertionFailureTest.java rename to infer/tests/endtoend/c/infer/AssertionFailureTest.java index b95a2e02b..25b6aa16e 100644 --- a/infer/tests/endtoend/c/AssertionFailureTest.java +++ b/infer/tests/endtoend/c/infer/AssertionFailureTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/c/BUCK b/infer/tests/endtoend/c/infer/BUCK similarity index 90% rename from infer/tests/endtoend/c/BUCK rename to infer/tests/endtoend/c/infer/BUCK index 3a01c217b..a1874be7e 100644 --- a/infer/tests/endtoend/c/BUCK +++ b/infer/tests/endtoend/c/infer/BUCK @@ -11,6 +11,6 @@ java_test( '//infer/tests/codetoanalyze/c/errors:analyze', ], visibility=[ - 'PUBLIC', - ], + 'PUBLIC', + ], ) diff --git a/infer/tests/endtoend/c/CompoundLiteralExprTest.java b/infer/tests/endtoend/c/infer/CompoundLiteralExprTest.java similarity index 89% rename from infer/tests/endtoend/c/CompoundLiteralExprTest.java rename to infer/tests/endtoend/c/infer/CompoundLiteralExprTest.java index 1aeba9b9d..574bdebbd 100644 --- a/infer/tests/endtoend/c/CompoundLiteralExprTest.java +++ b/infer/tests/endtoend/c/infer/CompoundLiteralExprTest.java @@ -7,23 +7,18 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; -import com.google.common.collect.ImmutableList; - import org.junit.BeforeClass; -import org.junit.ClassRule; import org.junit.Test; import java.io.IOException; -import utils.DebuggableTemporaryFolder; import utils.InferException; import utils.InferResults; -import utils.InferRunner; public class CompoundLiteralExprTest { diff --git a/infer/tests/endtoend/c/CustomErrorTest.java b/infer/tests/endtoend/c/infer/CustomErrorTest.java similarity index 98% rename from infer/tests/endtoend/c/CustomErrorTest.java rename to infer/tests/endtoend/c/infer/CustomErrorTest.java index 9b8b05b04..a80f85908 100644 --- a/infer/tests/endtoend/c/CustomErrorTest.java +++ b/infer/tests/endtoend/c/infer/CustomErrorTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/c/DanglingDereferenceTest.java b/infer/tests/endtoend/c/infer/DanglingDereferenceTest.java similarity index 94% rename from infer/tests/endtoend/c/DanglingDereferenceTest.java rename to infer/tests/endtoend/c/infer/DanglingDereferenceTest.java index 88c050e74..6cf7fc68b 100644 --- a/infer/tests/endtoend/c/DanglingDereferenceTest.java +++ b/infer/tests/endtoend/c/infer/DanglingDereferenceTest.java @@ -7,11 +7,10 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; -import static utils.matchers.ResultContainsLineNumbers.containsLines; import static utils.matchers.ResultContainsErrorInMethod.contains; import org.junit.BeforeClass; import org.junit.Test; @@ -20,7 +19,6 @@ import java.io.IOException; import utils.InferException; import utils.InferResults; -import utils.InferRunner; public class DanglingDereferenceTest { diff --git a/infer/tests/endtoend/c/DivideByZeroTest.java b/infer/tests/endtoend/c/infer/DivideByZeroTest.java similarity index 98% rename from infer/tests/endtoend/c/DivideByZeroTest.java rename to infer/tests/endtoend/c/infer/DivideByZeroTest.java index ea40e0dc0..cea2779d1 100644 --- a/infer/tests/endtoend/c/DivideByZeroTest.java +++ b/infer/tests/endtoend/c/infer/DivideByZeroTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/c/EnumTest.java b/infer/tests/endtoend/c/infer/EnumTest.java similarity index 98% rename from infer/tests/endtoend/c/EnumTest.java rename to infer/tests/endtoend/c/infer/EnumTest.java index 455ebdb81..b800de930 100644 --- a/infer/tests/endtoend/c/EnumTest.java +++ b/infer/tests/endtoend/c/infer/EnumTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/c/InitListExprTest.java b/infer/tests/endtoend/c/infer/InitListExprTest.java similarity index 89% rename from infer/tests/endtoend/c/InitListExprTest.java rename to infer/tests/endtoend/c/infer/InitListExprTest.java index a3a99398b..204d9a820 100644 --- a/infer/tests/endtoend/c/InitListExprTest.java +++ b/infer/tests/endtoend/c/infer/InitListExprTest.java @@ -7,23 +7,18 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; -import com.google.common.collect.ImmutableList; - import org.junit.BeforeClass; -import org.junit.ClassRule; import org.junit.Test; import java.io.IOException; -import utils.DebuggableTemporaryFolder; import utils.InferException; import utils.InferResults; -import utils.InferRunner; public class InitListExprTest { diff --git a/infer/tests/endtoend/c/ListsTest.java b/infer/tests/endtoend/c/infer/ListsTest.java similarity index 98% rename from infer/tests/endtoend/c/ListsTest.java rename to infer/tests/endtoend/c/infer/ListsTest.java index e1b98ea06..df525b151 100644 --- a/infer/tests/endtoend/c/ListsTest.java +++ b/infer/tests/endtoend/c/infer/ListsTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/c/LocalVarsTest.java b/infer/tests/endtoend/c/infer/LocalVarsTest.java similarity index 98% rename from infer/tests/endtoend/c/LocalVarsTest.java rename to infer/tests/endtoend/c/infer/LocalVarsTest.java index cb775658e..67190c53c 100644 --- a/infer/tests/endtoend/c/LocalVarsTest.java +++ b/infer/tests/endtoend/c/infer/LocalVarsTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/c/MemoryLeakTest.java b/infer/tests/endtoend/c/infer/MemoryLeakTest.java similarity index 98% rename from infer/tests/endtoend/c/MemoryLeakTest.java rename to infer/tests/endtoend/c/infer/MemoryLeakTest.java index b769c5fbf..6841b8d65 100644 --- a/infer/tests/endtoend/c/MemoryLeakTest.java +++ b/infer/tests/endtoend/c/infer/MemoryLeakTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/c/NullDereferenceShortCircuitTest.java b/infer/tests/endtoend/c/infer/NullDereferenceShortCircuitTest.java similarity index 98% rename from infer/tests/endtoend/c/NullDereferenceShortCircuitTest.java rename to infer/tests/endtoend/c/infer/NullDereferenceShortCircuitTest.java index a86608702..12b344803 100644 --- a/infer/tests/endtoend/c/NullDereferenceShortCircuitTest.java +++ b/infer/tests/endtoend/c/infer/NullDereferenceShortCircuitTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/c/NullDereferenceTest.java b/infer/tests/endtoend/c/infer/NullDereferenceTest.java similarity index 98% rename from infer/tests/endtoend/c/NullDereferenceTest.java rename to infer/tests/endtoend/c/infer/NullDereferenceTest.java index 4745578c2..a41b7df1a 100644 --- a/infer/tests/endtoend/c/NullDereferenceTest.java +++ b/infer/tests/endtoend/c/infer/NullDereferenceTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsLineNumbers.containsLines; diff --git a/infer/tests/endtoend/c/NullDereferenceTest2.java b/infer/tests/endtoend/c/infer/NullDereferenceTest2.java similarity index 98% rename from infer/tests/endtoend/c/NullDereferenceTest2.java rename to infer/tests/endtoend/c/infer/NullDereferenceTest2.java index 0fb87e5a0..3fd9abd9d 100644 --- a/infer/tests/endtoend/c/NullDereferenceTest2.java +++ b/infer/tests/endtoend/c/infer/NullDereferenceTest2.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/c/NullDereferenceTest3.java b/infer/tests/endtoend/c/infer/NullDereferenceTest3.java similarity index 94% rename from infer/tests/endtoend/c/NullDereferenceTest3.java rename to infer/tests/endtoend/c/infer/NullDereferenceTest3.java index 3c03f8b12..f816daa26 100644 --- a/infer/tests/endtoend/c/NullDereferenceTest3.java +++ b/infer/tests/endtoend/c/infer/NullDereferenceTest3.java @@ -7,11 +7,10 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; -import static utils.matchers.ResultContainsLineNumbers.containsLines; import org.junit.BeforeClass; import org.junit.Test; diff --git a/infer/tests/endtoend/c/ResourceLeakTest.java b/infer/tests/endtoend/c/infer/ResourceLeakTest.java similarity index 98% rename from infer/tests/endtoend/c/ResourceLeakTest.java rename to infer/tests/endtoend/c/infer/ResourceLeakTest.java index a46d99ffc..78784cf94 100644 --- a/infer/tests/endtoend/c/ResourceLeakTest.java +++ b/infer/tests/endtoend/c/infer/ResourceLeakTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/c/SentinelTest.java b/infer/tests/endtoend/c/infer/SentinelTest.java similarity index 98% rename from infer/tests/endtoend/c/SentinelTest.java rename to infer/tests/endtoend/c/infer/SentinelTest.java index b645dfffb..d6a40f4c6 100644 --- a/infer/tests/endtoend/c/SentinelTest.java +++ b/infer/tests/endtoend/c/infer/SentinelTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/c/UnsafeMallocTest.java b/infer/tests/endtoend/c/infer/UnsafeMallocTest.java similarity index 98% rename from infer/tests/endtoend/c/UnsafeMallocTest.java rename to infer/tests/endtoend/c/infer/UnsafeMallocTest.java index 829282532..619dff134 100644 --- a/infer/tests/endtoend/c/UnsafeMallocTest.java +++ b/infer/tests/endtoend/c/infer/UnsafeMallocTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.c; +package endtoend.c.infer; import com.google.common.collect.ImmutableList; diff --git a/infer/tests/endtoend/cpp/infer/BUCK b/infer/tests/endtoend/cpp/infer/BUCK new file mode 100644 index 000000000..c1a3eab2c --- /dev/null +++ b/infer/tests/endtoend/cpp/infer/BUCK @@ -0,0 +1,35 @@ +tests_dependencies = [ + '//infer/lib/java/android:android', + '//dependencies/java/guava:guava', + '//dependencies/java/junit:hamcrest', + '//dependencies/java/jackson:jackson', + '//dependencies/java/jsr-305:jsr-305', + '//dependencies/java/junit:junit', + '//dependencies/java/opencsv:opencsv', + '//infer/tests/utils:utils', +] + +cpp_infer_test_sources = glob(['*.java']) +cpp_infer_test_deps = [] +for test_source in cpp_infer_test_sources: + target_name = test_source.replace("/", "_")[:-len(".java")] + cpp_infer_test_deps.append(target_name) + + java_test( + name=target_name, + srcs=[test_source], + deps=tests_dependencies, + visibility=[ + 'PUBLIC', + ], + source='7', + target='7', + ) + +java_test( + name='infer', + deps=[':' + x for x in cpp_infer_test_deps], + visibility=[ + 'PUBLIC', + ], +) diff --git a/infer/tests/endtoend/cpp/BoxedPtrTest.java b/infer/tests/endtoend/cpp/infer/BoxedPtrTest.java similarity index 98% rename from infer/tests/endtoend/cpp/BoxedPtrTest.java rename to infer/tests/endtoend/cpp/infer/BoxedPtrTest.java index 5042050c3..2087c1d84 100644 --- a/infer/tests/endtoend/cpp/BoxedPtrTest.java +++ b/infer/tests/endtoend/cpp/infer/BoxedPtrTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/CBugsTest.java b/infer/tests/endtoend/cpp/infer/CBugsTest.java similarity index 99% rename from infer/tests/endtoend/cpp/CBugsTest.java rename to infer/tests/endtoend/cpp/infer/CBugsTest.java index ee585341f..cc882eeb4 100644 --- a/infer/tests/endtoend/cpp/CBugsTest.java +++ b/infer/tests/endtoend/cpp/infer/CBugsTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/cpp/ClassTemplateTest.java b/infer/tests/endtoend/cpp/infer/ClassTemplateTest.java similarity index 98% rename from infer/tests/endtoend/cpp/ClassTemplateTest.java rename to infer/tests/endtoend/cpp/infer/ClassTemplateTest.java index 760da039b..9a07ca4e9 100644 --- a/infer/tests/endtoend/cpp/ClassTemplateTest.java +++ b/infer/tests/endtoend/cpp/infer/ClassTemplateTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/ConstructorInitTest.java b/infer/tests/endtoend/cpp/infer/ConstructorInitTest.java similarity index 98% rename from infer/tests/endtoend/cpp/ConstructorInitTest.java rename to infer/tests/endtoend/cpp/infer/ConstructorInitTest.java index d648a79e3..1d48f9a53 100644 --- a/infer/tests/endtoend/cpp/ConstructorInitTest.java +++ b/infer/tests/endtoend/cpp/infer/ConstructorInitTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/ConstructorNewTest.java b/infer/tests/endtoend/cpp/infer/ConstructorNewTest.java similarity index 98% rename from infer/tests/endtoend/cpp/ConstructorNewTest.java rename to infer/tests/endtoend/cpp/infer/ConstructorNewTest.java index ad7971459..75313cbb2 100644 --- a/infer/tests/endtoend/cpp/ConstructorNewTest.java +++ b/infer/tests/endtoend/cpp/infer/ConstructorNewTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/ConstructorWithBodyTest.java b/infer/tests/endtoend/cpp/infer/ConstructorWithBodyTest.java similarity index 98% rename from infer/tests/endtoend/cpp/ConstructorWithBodyTest.java rename to infer/tests/endtoend/cpp/infer/ConstructorWithBodyTest.java index 062124f03..c39191236 100644 --- a/infer/tests/endtoend/cpp/ConstructorWithBodyTest.java +++ b/infer/tests/endtoend/cpp/infer/ConstructorWithBodyTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/cpp/ConversionOperatorTest.java b/infer/tests/endtoend/cpp/infer/ConversionOperatorTest.java similarity index 98% rename from infer/tests/endtoend/cpp/ConversionOperatorTest.java rename to infer/tests/endtoend/cpp/infer/ConversionOperatorTest.java index 27eabc786..a29617892 100644 --- a/infer/tests/endtoend/cpp/ConversionOperatorTest.java +++ b/infer/tests/endtoend/cpp/infer/ConversionOperatorTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/CopyMoveConstructorTest.java b/infer/tests/endtoend/cpp/infer/CopyMoveConstructorTest.java similarity index 98% rename from infer/tests/endtoend/cpp/CopyMoveConstructorTest.java rename to infer/tests/endtoend/cpp/infer/CopyMoveConstructorTest.java index 73d40b47e..f634d4d76 100644 --- a/infer/tests/endtoend/cpp/CopyMoveConstructorTest.java +++ b/infer/tests/endtoend/cpp/infer/CopyMoveConstructorTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/DerefAfterMoveTest.java b/infer/tests/endtoend/cpp/infer/DerefAfterMoveTest.java similarity index 98% rename from infer/tests/endtoend/cpp/DerefAfterMoveTest.java rename to infer/tests/endtoend/cpp/infer/DerefAfterMoveTest.java index 98dd93e4b..26427a747 100644 --- a/infer/tests/endtoend/cpp/DerefAfterMoveTest.java +++ b/infer/tests/endtoend/cpp/infer/DerefAfterMoveTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/DynamicCastTest.java b/infer/tests/endtoend/cpp/infer/DynamicCastTest.java similarity index 99% rename from infer/tests/endtoend/cpp/DynamicCastTest.java rename to infer/tests/endtoend/cpp/infer/DynamicCastTest.java index 7cd7b8965..9b7075200 100644 --- a/infer/tests/endtoend/cpp/DynamicCastTest.java +++ b/infer/tests/endtoend/cpp/infer/DynamicCastTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/cpp/ExceptionsTest.java b/infer/tests/endtoend/cpp/infer/ExceptionsTest.java similarity index 98% rename from infer/tests/endtoend/cpp/ExceptionsTest.java rename to infer/tests/endtoend/cpp/infer/ExceptionsTest.java index 03d09b0dd..4e979b966 100644 --- a/infer/tests/endtoend/cpp/ExceptionsTest.java +++ b/infer/tests/endtoend/cpp/infer/ExceptionsTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/FallthroughTest.java b/infer/tests/endtoend/cpp/infer/FallthroughTest.java similarity index 98% rename from infer/tests/endtoend/cpp/FallthroughTest.java rename to infer/tests/endtoend/cpp/infer/FallthroughTest.java index 63447dd63..f98a5f540 100644 --- a/infer/tests/endtoend/cpp/FallthroughTest.java +++ b/infer/tests/endtoend/cpp/infer/FallthroughTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/FunctionTemplateTest.java b/infer/tests/endtoend/cpp/infer/FunctionTemplateTest.java similarity index 98% rename from infer/tests/endtoend/cpp/FunctionTemplateTest.java rename to infer/tests/endtoend/cpp/infer/FunctionTemplateTest.java index d3afd3da1..336978075 100644 --- a/infer/tests/endtoend/cpp/FunctionTemplateTest.java +++ b/infer/tests/endtoend/cpp/infer/FunctionTemplateTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/IncludeHeaderNoTemplTest.java b/infer/tests/endtoend/cpp/infer/IncludeHeaderNoTemplTest.java similarity index 98% rename from infer/tests/endtoend/cpp/IncludeHeaderNoTemplTest.java rename to infer/tests/endtoend/cpp/infer/IncludeHeaderNoTemplTest.java index cecc7b15a..ff575565f 100644 --- a/infer/tests/endtoend/cpp/IncludeHeaderNoTemplTest.java +++ b/infer/tests/endtoend/cpp/infer/IncludeHeaderNoTemplTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/IncludeHeaderTemplTest.java b/infer/tests/endtoend/cpp/infer/IncludeHeaderTemplTest.java similarity index 98% rename from infer/tests/endtoend/cpp/IncludeHeaderTemplTest.java rename to infer/tests/endtoend/cpp/infer/IncludeHeaderTemplTest.java index b8198ccd1..a50f06348 100644 --- a/infer/tests/endtoend/cpp/IncludeHeaderTemplTest.java +++ b/infer/tests/endtoend/cpp/infer/IncludeHeaderTemplTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/InheritanceFieldTest.java b/infer/tests/endtoend/cpp/infer/InheritanceFieldTest.java similarity index 98% rename from infer/tests/endtoend/cpp/InheritanceFieldTest.java rename to infer/tests/endtoend/cpp/infer/InheritanceFieldTest.java index d4436d69a..01093a2fb 100644 --- a/infer/tests/endtoend/cpp/InheritanceFieldTest.java +++ b/infer/tests/endtoend/cpp/infer/InheritanceFieldTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/LValueConditionalTest.java b/infer/tests/endtoend/cpp/infer/LValueConditionalTest.java similarity index 98% rename from infer/tests/endtoend/cpp/LValueConditionalTest.java rename to infer/tests/endtoend/cpp/infer/LValueConditionalTest.java index 2a5ef758c..a08a374dd 100644 --- a/infer/tests/endtoend/cpp/LValueConditionalTest.java +++ b/infer/tests/endtoend/cpp/infer/LValueConditionalTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/LambdaTest.java b/infer/tests/endtoend/cpp/infer/LambdaTest.java similarity index 98% rename from infer/tests/endtoend/cpp/LambdaTest.java rename to infer/tests/endtoend/cpp/infer/LambdaTest.java index 19983c559..061962710 100644 --- a/infer/tests/endtoend/cpp/LambdaTest.java +++ b/infer/tests/endtoend/cpp/infer/LambdaTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/cpp/MemoryLeakArrayTest.java b/infer/tests/endtoend/cpp/infer/MemoryLeakArrayTest.java similarity index 98% rename from infer/tests/endtoend/cpp/MemoryLeakArrayTest.java rename to infer/tests/endtoend/cpp/infer/MemoryLeakArrayTest.java index 5577e951a..36158d178 100644 --- a/infer/tests/endtoend/cpp/MemoryLeakArrayTest.java +++ b/infer/tests/endtoend/cpp/infer/MemoryLeakArrayTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/MemoryLeakCppBucketTest.java b/infer/tests/endtoend/cpp/infer/MemoryLeakCppBucketTest.java similarity index 98% rename from infer/tests/endtoend/cpp/MemoryLeakCppBucketTest.java rename to infer/tests/endtoend/cpp/infer/MemoryLeakCppBucketTest.java index c151d9497..b6154bc69 100644 --- a/infer/tests/endtoend/cpp/MemoryLeakCppBucketTest.java +++ b/infer/tests/endtoend/cpp/infer/MemoryLeakCppBucketTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/MemoryLeakTest.java b/infer/tests/endtoend/cpp/infer/MemoryLeakTest.java similarity index 98% rename from infer/tests/endtoend/cpp/MemoryLeakTest.java rename to infer/tests/endtoend/cpp/infer/MemoryLeakTest.java index 5653f20b1..c6df21288 100644 --- a/infer/tests/endtoend/cpp/MemoryLeakTest.java +++ b/infer/tests/endtoend/cpp/infer/MemoryLeakTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/MethodTemplateTest.java b/infer/tests/endtoend/cpp/infer/MethodTemplateTest.java similarity index 98% rename from infer/tests/endtoend/cpp/MethodTemplateTest.java rename to infer/tests/endtoend/cpp/infer/MethodTemplateTest.java index 85b6fa976..ebb0c205e 100644 --- a/infer/tests/endtoend/cpp/MethodTemplateTest.java +++ b/infer/tests/endtoend/cpp/infer/MethodTemplateTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/MinMaxNumericTest.java b/infer/tests/endtoend/cpp/infer/MinMaxNumericTest.java similarity index 98% rename from infer/tests/endtoend/cpp/MinMaxNumericTest.java rename to infer/tests/endtoend/cpp/infer/MinMaxNumericTest.java index 31129a98a..c9136a882 100644 --- a/infer/tests/endtoend/cpp/MinMaxNumericTest.java +++ b/infer/tests/endtoend/cpp/infer/MinMaxNumericTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/MoveModelTest.java b/infer/tests/endtoend/cpp/infer/MoveModelTest.java similarity index 98% rename from infer/tests/endtoend/cpp/MoveModelTest.java rename to infer/tests/endtoend/cpp/infer/MoveModelTest.java index dfb819900..7a5b6e2cd 100644 --- a/infer/tests/endtoend/cpp/MoveModelTest.java +++ b/infer/tests/endtoend/cpp/infer/MoveModelTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/NPEAddedToB1Test.java b/infer/tests/endtoend/cpp/infer/NPEAddedToB1Test.java similarity index 98% rename from infer/tests/endtoend/cpp/NPEAddedToB1Test.java rename to infer/tests/endtoend/cpp/infer/NPEAddedToB1Test.java index 7eafc6d52..68743b738 100644 --- a/infer/tests/endtoend/cpp/NPEAddedToB1Test.java +++ b/infer/tests/endtoend/cpp/infer/NPEAddedToB1Test.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/cpp/NPEWhenMethodCallTest.java b/infer/tests/endtoend/cpp/infer/NPEWhenMethodCallTest.java similarity index 98% rename from infer/tests/endtoend/cpp/NPEWhenMethodCallTest.java rename to infer/tests/endtoend/cpp/infer/NPEWhenMethodCallTest.java index 9c4210e3e..5d5726b45 100644 --- a/infer/tests/endtoend/cpp/NPEWhenMethodCallTest.java +++ b/infer/tests/endtoend/cpp/infer/NPEWhenMethodCallTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/cpp/NamespaceFunctionTest.java b/infer/tests/endtoend/cpp/infer/NamespaceFunctionTest.java similarity index 98% rename from infer/tests/endtoend/cpp/NamespaceFunctionTest.java rename to infer/tests/endtoend/cpp/infer/NamespaceFunctionTest.java index 36a21e510..24ab5c873 100644 --- a/infer/tests/endtoend/cpp/NamespaceFunctionTest.java +++ b/infer/tests/endtoend/cpp/infer/NamespaceFunctionTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/NamespaceGlobalVariableTest.java b/infer/tests/endtoend/cpp/infer/NamespaceGlobalVariableTest.java similarity index 98% rename from infer/tests/endtoend/cpp/NamespaceGlobalVariableTest.java rename to infer/tests/endtoend/cpp/infer/NamespaceGlobalVariableTest.java index 6c426875a..29589ce42 100644 --- a/infer/tests/endtoend/cpp/NamespaceGlobalVariableTest.java +++ b/infer/tests/endtoend/cpp/infer/NamespaceGlobalVariableTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/NestedCPPOperatorsTest.java b/infer/tests/endtoend/cpp/infer/NestedCPPOperatorsTest.java similarity index 98% rename from infer/tests/endtoend/cpp/NestedCPPOperatorsTest.java rename to infer/tests/endtoend/cpp/infer/NestedCPPOperatorsTest.java index c5e8af734..949d24595 100644 --- a/infer/tests/endtoend/cpp/NestedCPPOperatorsTest.java +++ b/infer/tests/endtoend/cpp/infer/NestedCPPOperatorsTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/cpp/NoNPEAfterDynamicCastTest.java b/infer/tests/endtoend/cpp/infer/NoNPEAfterDynamicCastTest.java similarity index 98% rename from infer/tests/endtoend/cpp/NoNPEAfterDynamicCastTest.java rename to infer/tests/endtoend/cpp/infer/NoNPEAfterDynamicCastTest.java index 06ce2385b..3693a9b8d 100644 --- a/infer/tests/endtoend/cpp/NoNPEAfterDynamicCastTest.java +++ b/infer/tests/endtoend/cpp/infer/NoNPEAfterDynamicCastTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/cpp/NullReturnedByMethodTest.java b/infer/tests/endtoend/cpp/infer/NullReturnedByMethodTest.java similarity index 98% rename from infer/tests/endtoend/cpp/NullReturnedByMethodTest.java rename to infer/tests/endtoend/cpp/infer/NullReturnedByMethodTest.java index 8bcea0446..8b317dd43 100644 --- a/infer/tests/endtoend/cpp/NullReturnedByMethodTest.java +++ b/infer/tests/endtoend/cpp/infer/NullReturnedByMethodTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/cpp/ObjectDereferenceTest.java b/infer/tests/endtoend/cpp/infer/ObjectDereferenceTest.java similarity index 98% rename from infer/tests/endtoend/cpp/ObjectDereferenceTest.java rename to infer/tests/endtoend/cpp/infer/ObjectDereferenceTest.java index 9112c00b2..a3fcb2133 100644 --- a/infer/tests/endtoend/cpp/ObjectDereferenceTest.java +++ b/infer/tests/endtoend/cpp/infer/ObjectDereferenceTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/cpp/OperatorOverloadTest.java b/infer/tests/endtoend/cpp/infer/OperatorOverloadTest.java similarity index 98% rename from infer/tests/endtoend/cpp/OperatorOverloadTest.java rename to infer/tests/endtoend/cpp/infer/OperatorOverloadTest.java index 448278ab2..e0b27e79a 100644 --- a/infer/tests/endtoend/cpp/OperatorOverloadTest.java +++ b/infer/tests/endtoend/cpp/infer/OperatorOverloadTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/ReferenceFieldTest.java b/infer/tests/endtoend/cpp/infer/ReferenceFieldTest.java similarity index 98% rename from infer/tests/endtoend/cpp/ReferenceFieldTest.java rename to infer/tests/endtoend/cpp/infer/ReferenceFieldTest.java index ca5d550aa..501a5df61 100644 --- a/infer/tests/endtoend/cpp/ReferenceFieldTest.java +++ b/infer/tests/endtoend/cpp/infer/ReferenceFieldTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/ReferenceStructTest.java b/infer/tests/endtoend/cpp/infer/ReferenceStructTest.java similarity index 98% rename from infer/tests/endtoend/cpp/ReferenceStructTest.java rename to infer/tests/endtoend/cpp/infer/ReferenceStructTest.java index 167132593..e3daaff8d 100644 --- a/infer/tests/endtoend/cpp/ReferenceStructTest.java +++ b/infer/tests/endtoend/cpp/infer/ReferenceStructTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/ReferenceTypeTest.java b/infer/tests/endtoend/cpp/infer/ReferenceTypeTest.java similarity index 98% rename from infer/tests/endtoend/cpp/ReferenceTypeTest.java rename to infer/tests/endtoend/cpp/infer/ReferenceTypeTest.java index f7cce1eab..b1004c9e6 100644 --- a/infer/tests/endtoend/cpp/ReferenceTypeTest.java +++ b/infer/tests/endtoend/cpp/infer/ReferenceTypeTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/ReturnStructTest.java b/infer/tests/endtoend/cpp/infer/ReturnStructTest.java similarity index 98% rename from infer/tests/endtoend/cpp/ReturnStructTest.java rename to infer/tests/endtoend/cpp/infer/ReturnStructTest.java index e7ef84e1a..6ae9a5d21 100644 --- a/infer/tests/endtoend/cpp/ReturnStructTest.java +++ b/infer/tests/endtoend/cpp/infer/ReturnStructTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/SharedPtrConstructorsTest.java b/infer/tests/endtoend/cpp/infer/SharedPtrConstructorsTest.java similarity index 98% rename from infer/tests/endtoend/cpp/SharedPtrConstructorsTest.java rename to infer/tests/endtoend/cpp/infer/SharedPtrConstructorsTest.java index b69b250e4..44428ca38 100644 --- a/infer/tests/endtoend/cpp/SharedPtrConstructorsTest.java +++ b/infer/tests/endtoend/cpp/infer/SharedPtrConstructorsTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/SharedPtrDerefTest.java b/infer/tests/endtoend/cpp/infer/SharedPtrDerefTest.java similarity index 98% rename from infer/tests/endtoend/cpp/SharedPtrDerefTest.java rename to infer/tests/endtoend/cpp/infer/SharedPtrDerefTest.java index 30dc96e6a..427cb19fb 100644 --- a/infer/tests/endtoend/cpp/SharedPtrDerefTest.java +++ b/infer/tests/endtoend/cpp/infer/SharedPtrDerefTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/StaticMethodTest.java b/infer/tests/endtoend/cpp/infer/StaticMethodTest.java similarity index 98% rename from infer/tests/endtoend/cpp/StaticMethodTest.java rename to infer/tests/endtoend/cpp/infer/StaticMethodTest.java index 901be6e10..14a91dc98 100644 --- a/infer/tests/endtoend/cpp/StaticMethodTest.java +++ b/infer/tests/endtoend/cpp/infer/StaticMethodTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/StructForwardDeclareTest.java b/infer/tests/endtoend/cpp/infer/StructForwardDeclareTest.java similarity index 98% rename from infer/tests/endtoend/cpp/StructForwardDeclareTest.java rename to infer/tests/endtoend/cpp/infer/StructForwardDeclareTest.java index 1631c14be..15368fcba 100644 --- a/infer/tests/endtoend/cpp/StructForwardDeclareTest.java +++ b/infer/tests/endtoend/cpp/infer/StructForwardDeclareTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/StructPassByValueTest.java b/infer/tests/endtoend/cpp/infer/StructPassByValueTest.java similarity index 98% rename from infer/tests/endtoend/cpp/StructPassByValueTest.java rename to infer/tests/endtoend/cpp/infer/StructPassByValueTest.java index dd53b296d..7aecb56c4 100644 --- a/infer/tests/endtoend/cpp/StructPassByValueTest.java +++ b/infer/tests/endtoend/cpp/infer/StructPassByValueTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/SubtypingCheckTest.java b/infer/tests/endtoend/cpp/infer/SubtypingCheckTest.java similarity index 98% rename from infer/tests/endtoend/cpp/SubtypingCheckTest.java rename to infer/tests/endtoend/cpp/infer/SubtypingCheckTest.java index 3e39dea31..04ab63763 100644 --- a/infer/tests/endtoend/cpp/SubtypingCheckTest.java +++ b/infer/tests/endtoend/cpp/infer/SubtypingCheckTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/TempObjectTest.java b/infer/tests/endtoend/cpp/infer/TempObjectTest.java similarity index 98% rename from infer/tests/endtoend/cpp/TempObjectTest.java rename to infer/tests/endtoend/cpp/infer/TempObjectTest.java index f5ba45864..115a59583 100644 --- a/infer/tests/endtoend/cpp/TempObjectTest.java +++ b/infer/tests/endtoend/cpp/infer/TempObjectTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/TemplateFunctionPackTest.java b/infer/tests/endtoend/cpp/infer/TemplateFunctionPackTest.java similarity index 98% rename from infer/tests/endtoend/cpp/TemplateFunctionPackTest.java rename to infer/tests/endtoend/cpp/infer/TemplateFunctionPackTest.java index 69646561d..3e07e4b9c 100644 --- a/infer/tests/endtoend/cpp/TemplateFunctionPackTest.java +++ b/infer/tests/endtoend/cpp/infer/TemplateFunctionPackTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/TemporaryLValueTest.java b/infer/tests/endtoend/cpp/infer/TemporaryLValueTest.java similarity index 98% rename from infer/tests/endtoend/cpp/TemporaryLValueTest.java rename to infer/tests/endtoend/cpp/infer/TemporaryLValueTest.java index 7bc2629a0..f186bcb88 100644 --- a/infer/tests/endtoend/cpp/TemporaryLValueTest.java +++ b/infer/tests/endtoend/cpp/infer/TemporaryLValueTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/ThisNotNullTest.java b/infer/tests/endtoend/cpp/infer/ThisNotNullTest.java similarity index 98% rename from infer/tests/endtoend/cpp/ThisNotNullTest.java rename to infer/tests/endtoend/cpp/infer/ThisNotNullTest.java index cbb48d3f2..5fde28359 100644 --- a/infer/tests/endtoend/cpp/ThisNotNullTest.java +++ b/infer/tests/endtoend/cpp/infer/ThisNotNullTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/TypeIdExprTest.java b/infer/tests/endtoend/cpp/infer/TypeIdExprTest.java similarity index 98% rename from infer/tests/endtoend/cpp/TypeIdExprTest.java rename to infer/tests/endtoend/cpp/infer/TypeIdExprTest.java index 950976d56..6e6eb4b92 100644 --- a/infer/tests/endtoend/cpp/TypeIdExprTest.java +++ b/infer/tests/endtoend/cpp/infer/TypeIdExprTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/UniquePtrDerefTest.java b/infer/tests/endtoend/cpp/infer/UniquePtrDerefTest.java similarity index 98% rename from infer/tests/endtoend/cpp/UniquePtrDerefTest.java rename to infer/tests/endtoend/cpp/infer/UniquePtrDerefTest.java index 6a8ffa646..9c5630e42 100644 --- a/infer/tests/endtoend/cpp/UniquePtrDerefTest.java +++ b/infer/tests/endtoend/cpp/infer/UniquePtrDerefTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/VectorEmptyAccessTest.java b/infer/tests/endtoend/cpp/infer/VectorEmptyAccessTest.java similarity index 98% rename from infer/tests/endtoend/cpp/VectorEmptyAccessTest.java rename to infer/tests/endtoend/cpp/infer/VectorEmptyAccessTest.java index 24d5f4516..f68da0730 100644 --- a/infer/tests/endtoend/cpp/VectorEmptyAccessTest.java +++ b/infer/tests/endtoend/cpp/infer/VectorEmptyAccessTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/cpp/VirtualMethodsTest.java b/infer/tests/endtoend/cpp/infer/VirtualMethodsTest.java similarity index 98% rename from infer/tests/endtoend/cpp/VirtualMethodsTest.java rename to infer/tests/endtoend/cpp/infer/VirtualMethodsTest.java index f85c8eb0f..188840ed5 100644 --- a/infer/tests/endtoend/cpp/VirtualMethodsTest.java +++ b/infer/tests/endtoend/cpp/infer/VirtualMethodsTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.cpp; +package endtoend.cpp.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/AutoreleaseTest.java b/infer/tests/endtoend/objc/infer/AutoreleaseTest.java similarity index 99% rename from infer/tests/endtoend/objc/AutoreleaseTest.java rename to infer/tests/endtoend/objc/infer/AutoreleaseTest.java index a926d4329..9079dfb87 100644 --- a/infer/tests/endtoend/objc/AutoreleaseTest.java +++ b/infer/tests/endtoend/objc/infer/AutoreleaseTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/infer/BUCK b/infer/tests/endtoend/objc/infer/BUCK new file mode 100644 index 000000000..03c93ca6d --- /dev/null +++ b/infer/tests/endtoend/objc/infer/BUCK @@ -0,0 +1,35 @@ +tests_dependencies = [ + '//infer/lib/java/android:android', + '//dependencies/java/guava:guava', + '//dependencies/java/junit:hamcrest', + '//dependencies/java/jackson:jackson', + '//dependencies/java/jsr-305:jsr-305', + '//dependencies/java/junit:junit', + '//dependencies/java/opencsv:opencsv', + '//infer/tests/utils:utils', +] + +objc_infer_test_sources = glob(['*.java']) +objc_infer_test_deps = [] +for test_source in objc_infer_test_sources: + target_name = test_source.replace("/", "_")[:-len(".java")] + objc_infer_test_deps.append(target_name) + + java_test( + name=target_name, + srcs=[test_source], + deps=tests_dependencies, + visibility=[ + 'PUBLIC', + ], + source='7', + target='7', + ) + +java_test( + name='infer', + deps=[':' + x for x in objc_infer_test_deps], + visibility=[ + 'PUBLIC', + ], +) diff --git a/infer/tests/endtoend/objc/BlockDispatchTest.java b/infer/tests/endtoend/objc/infer/BlockDispatchTest.java similarity index 98% rename from infer/tests/endtoend/objc/BlockDispatchTest.java rename to infer/tests/endtoend/objc/infer/BlockDispatchTest.java index 0a2907018..fb3b7c61d 100644 --- a/infer/tests/endtoend/objc/BlockDispatchTest.java +++ b/infer/tests/endtoend/objc/infer/BlockDispatchTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/BlockDivideByZeroTest.java b/infer/tests/endtoend/objc/infer/BlockDivideByZeroTest.java similarity index 98% rename from infer/tests/endtoend/objc/BlockDivideByZeroTest.java rename to infer/tests/endtoend/objc/infer/BlockDivideByZeroTest.java index 07585ae90..72a13223b 100644 --- a/infer/tests/endtoend/objc/BlockDivideByZeroTest.java +++ b/infer/tests/endtoend/objc/infer/BlockDivideByZeroTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/BlockGlobalVariableTest.java b/infer/tests/endtoend/objc/infer/BlockGlobalVariableTest.java similarity index 98% rename from infer/tests/endtoend/objc/BlockGlobalVariableTest.java rename to infer/tests/endtoend/objc/infer/BlockGlobalVariableTest.java index 8eb4c7d7d..395b8e702 100644 --- a/infer/tests/endtoend/objc/BlockGlobalVariableTest.java +++ b/infer/tests/endtoend/objc/infer/BlockGlobalVariableTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/BlockReleaseTest.java b/infer/tests/endtoend/objc/infer/BlockReleaseTest.java similarity index 98% rename from infer/tests/endtoend/objc/BlockReleaseTest.java rename to infer/tests/endtoend/objc/infer/BlockReleaseTest.java index ff9c252d3..d12f12875 100644 --- a/infer/tests/endtoend/objc/BlockReleaseTest.java +++ b/infer/tests/endtoend/objc/infer/BlockReleaseTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/BlockVarTest.java b/infer/tests/endtoend/objc/infer/BlockVarTest.java similarity index 98% rename from infer/tests/endtoend/objc/BlockVarTest.java rename to infer/tests/endtoend/objc/infer/BlockVarTest.java index b64ef64f8..abe40da80 100644 --- a/infer/tests/endtoend/objc/BlockVarTest.java +++ b/infer/tests/endtoend/objc/infer/BlockVarTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/CADisplayLinkTest.java b/infer/tests/endtoend/objc/infer/CADisplayLinkTest.java similarity index 98% rename from infer/tests/endtoend/objc/CADisplayLinkTest.java rename to infer/tests/endtoend/objc/infer/CADisplayLinkTest.java index 28f1d5d06..9cc763b03 100644 --- a/infer/tests/endtoend/objc/CADisplayLinkTest.java +++ b/infer/tests/endtoend/objc/infer/CADisplayLinkTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/CategoryProcdescTest.java b/infer/tests/endtoend/objc/infer/CategoryProcdescTest.java similarity index 98% rename from infer/tests/endtoend/objc/CategoryProcdescTest.java rename to infer/tests/endtoend/objc/infer/CategoryProcdescTest.java index 7f2eada32..d627e6a7c 100644 --- a/infer/tests/endtoend/objc/CategoryProcdescTest.java +++ b/infer/tests/endtoend/objc/infer/CategoryProcdescTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/CompoundLiteralExprTest.java b/infer/tests/endtoend/objc/infer/CompoundLiteralExprTest.java similarity index 98% rename from infer/tests/endtoend/objc/CompoundLiteralExprTest.java rename to infer/tests/endtoend/objc/infer/CompoundLiteralExprTest.java index 9fc862a68..ac3656ad6 100644 --- a/infer/tests/endtoend/objc/CompoundLiteralExprTest.java +++ b/infer/tests/endtoend/objc/infer/CompoundLiteralExprTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/DispatchInMacroTest.java b/infer/tests/endtoend/objc/infer/DispatchInMacroTest.java similarity index 98% rename from infer/tests/endtoend/objc/DispatchInMacroTest.java rename to infer/tests/endtoend/objc/infer/DispatchInMacroTest.java index 087d970dd..f70caa0f6 100644 --- a/infer/tests/endtoend/objc/DispatchInMacroTest.java +++ b/infer/tests/endtoend/objc/infer/DispatchInMacroTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/DispatchTest.java b/infer/tests/endtoend/objc/infer/DispatchTest.java similarity index 99% rename from infer/tests/endtoend/objc/DispatchTest.java rename to infer/tests/endtoend/objc/infer/DispatchTest.java index f00540fbe..9b0d1c8d8 100644 --- a/infer/tests/endtoend/objc/DispatchTest.java +++ b/infer/tests/endtoend/objc/infer/DispatchTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/ExplicitIvarNameInGetterTest.java b/infer/tests/endtoend/objc/infer/ExplicitIvarNameInGetterTest.java similarity index 98% rename from infer/tests/endtoend/objc/ExplicitIvarNameInGetterTest.java rename to infer/tests/endtoend/objc/infer/ExplicitIvarNameInGetterTest.java index 2a7c7ca9f..0ae8f6b26 100644 --- a/infer/tests/endtoend/objc/ExplicitIvarNameInGetterTest.java +++ b/infer/tests/endtoend/objc/infer/ExplicitIvarNameInGetterTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/FieldSuperclassTest.java b/infer/tests/endtoend/objc/infer/FieldSuperclassTest.java similarity index 98% rename from infer/tests/endtoend/objc/FieldSuperclassTest.java rename to infer/tests/endtoend/objc/infer/FieldSuperclassTest.java index 1afe5b63f..14e4c27e3 100644 --- a/infer/tests/endtoend/objc/FieldSuperclassTest.java +++ b/infer/tests/endtoend/objc/infer/FieldSuperclassTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/GetterBuiltinTest.java b/infer/tests/endtoend/objc/infer/GetterBuiltinTest.java similarity index 98% rename from infer/tests/endtoend/objc/GetterBuiltinTest.java rename to infer/tests/endtoend/objc/infer/GetterBuiltinTest.java index 9efcab5f0..03ecb643e 100644 --- a/infer/tests/endtoend/objc/GetterBuiltinTest.java +++ b/infer/tests/endtoend/objc/infer/GetterBuiltinTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/InitListExprTest.java b/infer/tests/endtoend/objc/infer/InitListExprTest.java similarity index 98% rename from infer/tests/endtoend/objc/InitListExprTest.java rename to infer/tests/endtoend/objc/infer/InitListExprTest.java index d2e8024e3..38d9323b2 100644 --- a/infer/tests/endtoend/objc/InitListExprTest.java +++ b/infer/tests/endtoend/objc/infer/InitListExprTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/KindOfClassTest.java b/infer/tests/endtoend/objc/infer/KindOfClassTest.java similarity index 98% rename from infer/tests/endtoend/objc/KindOfClassTest.java rename to infer/tests/endtoend/objc/infer/KindOfClassTest.java index 3bfb01983..82c9ac9f1 100644 --- a/infer/tests/endtoend/objc/KindOfClassTest.java +++ b/infer/tests/endtoend/objc/infer/KindOfClassTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/MemoryLeakBucketingArcTest.java b/infer/tests/endtoend/objc/infer/MemoryLeakBucketingArcTest.java similarity index 98% rename from infer/tests/endtoend/objc/MemoryLeakBucketingArcTest.java rename to infer/tests/endtoend/objc/infer/MemoryLeakBucketingArcTest.java index 713d2c2de..56a8c96fa 100644 --- a/infer/tests/endtoend/objc/MemoryLeakBucketingArcTest.java +++ b/infer/tests/endtoend/objc/infer/MemoryLeakBucketingArcTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/MemoryLeakBucketingTest.java b/infer/tests/endtoend/objc/infer/MemoryLeakBucketingTest.java similarity index 98% rename from infer/tests/endtoend/objc/MemoryLeakBucketingTest.java rename to infer/tests/endtoend/objc/infer/MemoryLeakBucketingTest.java index f306c3f5e..52f71c38f 100644 --- a/infer/tests/endtoend/objc/MemoryLeakBucketingTest.java +++ b/infer/tests/endtoend/objc/infer/MemoryLeakBucketingTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/MemoryLeakTest.java b/infer/tests/endtoend/objc/infer/MemoryLeakTest.java similarity index 98% rename from infer/tests/endtoend/objc/MemoryLeakTest.java rename to infer/tests/endtoend/objc/infer/MemoryLeakTest.java index d0508bb00..2fdc60cbf 100644 --- a/infer/tests/endtoend/objc/MemoryLeakTest.java +++ b/infer/tests/endtoend/objc/infer/MemoryLeakTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/MemoryLeaksFromModelsTest.java b/infer/tests/endtoend/objc/infer/MemoryLeaksFromModelsTest.java similarity index 99% rename from infer/tests/endtoend/objc/MemoryLeaksFromModelsTest.java rename to infer/tests/endtoend/objc/infer/MemoryLeaksFromModelsTest.java index 6a8eb226d..d01db8915 100644 --- a/infer/tests/endtoend/objc/MemoryLeaksFromModelsTest.java +++ b/infer/tests/endtoend/objc/infer/MemoryLeaksFromModelsTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/NPDCoreFoundationClassTest.java b/infer/tests/endtoend/objc/infer/NPDCoreFoundationClassTest.java similarity index 98% rename from infer/tests/endtoend/objc/NPDCoreFoundationClassTest.java rename to infer/tests/endtoend/objc/infer/NPDCoreFoundationClassTest.java index 89ec4f276..1c7b25c93 100644 --- a/infer/tests/endtoend/objc/NPDCoreFoundationClassTest.java +++ b/infer/tests/endtoend/objc/infer/NPDCoreFoundationClassTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsOnlyTheseErrors.containsOnly; diff --git a/infer/tests/endtoend/objc/NPEArrayLiteralTest.java b/infer/tests/endtoend/objc/infer/NPEArrayLiteralTest.java similarity index 98% rename from infer/tests/endtoend/objc/NPEArrayLiteralTest.java rename to infer/tests/endtoend/objc/infer/NPEArrayLiteralTest.java index b5d30d413..a8426c38b 100644 --- a/infer/tests/endtoend/objc/NPEArrayLiteralTest.java +++ b/infer/tests/endtoend/objc/infer/NPEArrayLiteralTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/NPEConditionalTest.java b/infer/tests/endtoend/objc/infer/NPEConditionalTest.java similarity index 98% rename from infer/tests/endtoend/objc/NPEConditionalTest.java rename to infer/tests/endtoend/objc/infer/NPEConditionalTest.java index ddd2db0b5..3c126953e 100644 --- a/infer/tests/endtoend/objc/NPEConditionalTest.java +++ b/infer/tests/endtoend/objc/infer/NPEConditionalTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/NPEDictionaryLiteralTest.java b/infer/tests/endtoend/objc/infer/NPEDictionaryLiteralTest.java similarity index 98% rename from infer/tests/endtoend/objc/NPEDictionaryLiteralTest.java rename to infer/tests/endtoend/objc/infer/NPEDictionaryLiteralTest.java index 73397e701..a36a264cc 100644 --- a/infer/tests/endtoend/objc/NPEDictionaryLiteralTest.java +++ b/infer/tests/endtoend/objc/infer/NPEDictionaryLiteralTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/NPEEqualNamesTest.java b/infer/tests/endtoend/objc/infer/NPEEqualNamesTest.java similarity index 98% rename from infer/tests/endtoend/objc/NPEEqualNamesTest.java rename to infer/tests/endtoend/objc/infer/NPEEqualNamesTest.java index 877702c3f..853e1c87c 100644 --- a/infer/tests/endtoend/objc/NPEEqualNamesTest.java +++ b/infer/tests/endtoend/objc/infer/NPEEqualNamesTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/NPEMallocTest.java b/infer/tests/endtoend/objc/infer/NPEMallocTest.java similarity index 98% rename from infer/tests/endtoend/objc/NPEMallocTest.java rename to infer/tests/endtoend/objc/infer/NPEMallocTest.java index a468db459..700331bc4 100644 --- a/infer/tests/endtoend/objc/NPEMallocTest.java +++ b/infer/tests/endtoend/objc/infer/NPEMallocTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/NPEObjCMethodInConditionTest.java b/infer/tests/endtoend/objc/infer/NPEObjCMethodInConditionTest.java similarity index 98% rename from infer/tests/endtoend/objc/NPEObjCMethodInConditionTest.java rename to infer/tests/endtoend/objc/infer/NPEObjCMethodInConditionTest.java index 8a0524146..b57c74c30 100644 --- a/infer/tests/endtoend/objc/NPEObjCMethodInConditionTest.java +++ b/infer/tests/endtoend/objc/infer/NPEObjCMethodInConditionTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/NPESelfTest.java b/infer/tests/endtoend/objc/infer/NPESelfTest.java similarity index 99% rename from infer/tests/endtoend/objc/NPESelfTest.java rename to infer/tests/endtoend/objc/infer/NPESelfTest.java index 6b5e975e6..118718a8f 100644 --- a/infer/tests/endtoend/objc/NPESelfTest.java +++ b/infer/tests/endtoend/objc/infer/NPESelfTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/NSAssertTest.java b/infer/tests/endtoend/objc/infer/NSAssertTest.java similarity index 98% rename from infer/tests/endtoend/objc/NSAssertTest.java rename to infer/tests/endtoend/objc/infer/NSAssertTest.java index bb946e67b..305c416b9 100644 --- a/infer/tests/endtoend/objc/NSAssertTest.java +++ b/infer/tests/endtoend/objc/infer/NSAssertTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/NSMakeCollectableTest.java b/infer/tests/endtoend/objc/infer/NSMakeCollectableTest.java similarity index 98% rename from infer/tests/endtoend/objc/NSMakeCollectableTest.java rename to infer/tests/endtoend/objc/infer/NSMakeCollectableTest.java index d00befc35..12e8eb4f0 100644 --- a/infer/tests/endtoend/objc/NSMakeCollectableTest.java +++ b/infer/tests/endtoend/objc/infer/NSMakeCollectableTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/NSNumber2Test.java b/infer/tests/endtoend/objc/infer/NSNumber2Test.java similarity index 98% rename from infer/tests/endtoend/objc/NSNumber2Test.java rename to infer/tests/endtoend/objc/infer/NSNumber2Test.java index c3259d593..3b30ab227 100644 --- a/infer/tests/endtoend/objc/NSNumber2Test.java +++ b/infer/tests/endtoend/objc/infer/NSNumber2Test.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/NSNumberTest.java b/infer/tests/endtoend/objc/infer/NSNumberTest.java similarity index 98% rename from infer/tests/endtoend/objc/NSNumberTest.java rename to infer/tests/endtoend/objc/infer/NSNumberTest.java index 47896257a..ec82aa364 100644 --- a/infer/tests/endtoend/objc/NSNumberTest.java +++ b/infer/tests/endtoend/objc/infer/NSNumberTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/NilParamDerefObjCClassTest.java b/infer/tests/endtoend/objc/infer/NilParamDerefObjCClassTest.java similarity index 98% rename from infer/tests/endtoend/objc/NilParamDerefObjCClassTest.java rename to infer/tests/endtoend/objc/infer/NilParamDerefObjCClassTest.java index 98bf12337..216f8b00a 100644 --- a/infer/tests/endtoend/objc/NilParamDerefObjCClassTest.java +++ b/infer/tests/endtoend/objc/infer/NilParamDerefObjCClassTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/NoMemoryLeakBlockIteratorTest.java b/infer/tests/endtoend/objc/infer/NoMemoryLeakBlockIteratorTest.java similarity index 98% rename from infer/tests/endtoend/objc/NoMemoryLeakBlockIteratorTest.java rename to infer/tests/endtoend/objc/infer/NoMemoryLeakBlockIteratorTest.java index 4e31dbd30..cf0730dea 100644 --- a/infer/tests/endtoend/objc/NoMemoryLeakBlockIteratorTest.java +++ b/infer/tests/endtoend/objc/infer/NoMemoryLeakBlockIteratorTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/NonnullAttributeTest.java b/infer/tests/endtoend/objc/infer/NonnullAttributeTest.java similarity index 98% rename from infer/tests/endtoend/objc/NonnullAttributeTest.java rename to infer/tests/endtoend/objc/infer/NonnullAttributeTest.java index c16f8ee85..36e96f5ed 100644 --- a/infer/tests/endtoend/objc/NonnullAttributeTest.java +++ b/infer/tests/endtoend/objc/infer/NonnullAttributeTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/NullDerefObjCBlockTest.java b/infer/tests/endtoend/objc/infer/NullDerefObjCBlockTest.java similarity index 99% rename from infer/tests/endtoend/objc/NullDerefObjCBlockTest.java rename to infer/tests/endtoend/objc/infer/NullDerefObjCBlockTest.java index f4cdda885..6c41a7103 100644 --- a/infer/tests/endtoend/objc/NullDerefObjCBlockTest.java +++ b/infer/tests/endtoend/objc/infer/NullDerefObjCBlockTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/NullDerefObjCClassTest.java b/infer/tests/endtoend/objc/infer/NullDerefObjCClassTest.java similarity index 98% rename from infer/tests/endtoend/objc/NullDerefObjCClassTest.java rename to infer/tests/endtoend/objc/infer/NullDerefObjCClassTest.java index 352a1c402..88d305601 100644 --- a/infer/tests/endtoend/objc/NullDerefObjCClassTest.java +++ b/infer/tests/endtoend/objc/infer/NullDerefObjCClassTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/NullParamTest.java b/infer/tests/endtoend/objc/infer/NullParamTest.java similarity index 98% rename from infer/tests/endtoend/objc/NullParamTest.java rename to infer/tests/endtoend/objc/infer/NullParamTest.java index 0ba718109..502d87961 100644 --- a/infer/tests/endtoend/objc/NullParamTest.java +++ b/infer/tests/endtoend/objc/infer/NullParamTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/NullReturnedByMethodTest.java b/infer/tests/endtoend/objc/infer/NullReturnedByMethodTest.java similarity index 98% rename from infer/tests/endtoend/objc/NullReturnedByMethodTest.java rename to infer/tests/endtoend/objc/infer/NullReturnedByMethodTest.java index ddbdea7c6..059da98cb 100644 --- a/infer/tests/endtoend/objc/NullReturnedByMethodTest.java +++ b/infer/tests/endtoend/objc/infer/NullReturnedByMethodTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/NullableTest.java b/infer/tests/endtoend/objc/infer/NullableTest.java similarity index 98% rename from infer/tests/endtoend/objc/NullableTest.java rename to infer/tests/endtoend/objc/infer/NullableTest.java index a70b02396..cca52b9b8 100644 --- a/infer/tests/endtoend/objc/NullableTest.java +++ b/infer/tests/endtoend/objc/infer/NullableTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/ParameterNotNullableTest.java b/infer/tests/endtoend/objc/infer/ParameterNotNullableTest.java similarity index 99% rename from infer/tests/endtoend/objc/ParameterNotNullableTest.java rename to infer/tests/endtoend/objc/infer/ParameterNotNullableTest.java index 4e1cec549..ffe9bf93a 100644 --- a/infer/tests/endtoend/objc/ParameterNotNullableTest.java +++ b/infer/tests/endtoend/objc/infer/ParameterNotNullableTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/PrematureNilTerminationTest.java b/infer/tests/endtoend/objc/infer/PrematureNilTerminationTest.java similarity index 98% rename from infer/tests/endtoend/objc/PrematureNilTerminationTest.java rename to infer/tests/endtoend/objc/infer/PrematureNilTerminationTest.java index d99dfd839..4b0873d12 100644 --- a/infer/tests/endtoend/objc/PrematureNilTerminationTest.java +++ b/infer/tests/endtoend/objc/infer/PrematureNilTerminationTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/ProcdescTest.java b/infer/tests/endtoend/objc/infer/ProcdescTest.java similarity index 98% rename from infer/tests/endtoend/objc/ProcdescTest.java rename to infer/tests/endtoend/objc/infer/ProcdescTest.java index cdf887cb6..cba69caaf 100644 --- a/infer/tests/endtoend/objc/ProcdescTest.java +++ b/infer/tests/endtoend/objc/infer/ProcdescTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/PropertyMemoryLeakTest.java b/infer/tests/endtoend/objc/infer/PropertyMemoryLeakTest.java similarity index 98% rename from infer/tests/endtoend/objc/PropertyMemoryLeakTest.java rename to infer/tests/endtoend/objc/infer/PropertyMemoryLeakTest.java index 848880f37..2da6e8c83 100644 --- a/infer/tests/endtoend/objc/PropertyMemoryLeakTest.java +++ b/infer/tests/endtoend/objc/infer/PropertyMemoryLeakTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/PropertyTest.java b/infer/tests/endtoend/objc/infer/PropertyTest.java similarity index 98% rename from infer/tests/endtoend/objc/PropertyTest.java rename to infer/tests/endtoend/objc/infer/PropertyTest.java index fd867d742..e0517d947 100644 --- a/infer/tests/endtoend/objc/PropertyTest.java +++ b/infer/tests/endtoend/objc/infer/PropertyTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/ProtocolProcdescTest.java b/infer/tests/endtoend/objc/infer/ProtocolProcdescTest.java similarity index 98% rename from infer/tests/endtoend/objc/ProtocolProcdescTest.java rename to infer/tests/endtoend/objc/infer/ProtocolProcdescTest.java index e472884ba..e71d7ba97 100644 --- a/infer/tests/endtoend/objc/ProtocolProcdescTest.java +++ b/infer/tests/endtoend/objc/infer/ProtocolProcdescTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/ResourceLeakTest.java b/infer/tests/endtoend/objc/infer/ResourceLeakTest.java similarity index 98% rename from infer/tests/endtoend/objc/ResourceLeakTest.java rename to infer/tests/endtoend/objc/infer/ResourceLeakTest.java index f942beb0d..18cc597c1 100644 --- a/infer/tests/endtoend/objc/ResourceLeakTest.java +++ b/infer/tests/endtoend/objc/infer/ResourceLeakTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/RetainCycle2Test.java b/infer/tests/endtoend/objc/infer/RetainCycle2Test.java similarity index 98% rename from infer/tests/endtoend/objc/RetainCycle2Test.java rename to infer/tests/endtoend/objc/infer/RetainCycle2Test.java index 529457836..5b60d9ff7 100644 --- a/infer/tests/endtoend/objc/RetainCycle2Test.java +++ b/infer/tests/endtoend/objc/infer/RetainCycle2Test.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/RetainCycleStaticVarTest.java b/infer/tests/endtoend/objc/infer/RetainCycleStaticVarTest.java similarity index 98% rename from infer/tests/endtoend/objc/RetainCycleStaticVarTest.java rename to infer/tests/endtoend/objc/infer/RetainCycleStaticVarTest.java index 93914085b..5ff73cd91 100644 --- a/infer/tests/endtoend/objc/RetainCycleStaticVarTest.java +++ b/infer/tests/endtoend/objc/infer/RetainCycleStaticVarTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/RetainCycleTest.java b/infer/tests/endtoend/objc/infer/RetainCycleTest.java similarity index 99% rename from infer/tests/endtoend/objc/RetainCycleTest.java rename to infer/tests/endtoend/objc/infer/RetainCycleTest.java index d91d14744..a34677964 100644 --- a/infer/tests/endtoend/objc/RetainCycleTest.java +++ b/infer/tests/endtoend/objc/infer/RetainCycleTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/RetainreleaseTest.java b/infer/tests/endtoend/objc/infer/RetainreleaseTest.java similarity index 98% rename from infer/tests/endtoend/objc/RetainreleaseTest.java rename to infer/tests/endtoend/objc/infer/RetainreleaseTest.java index 9d624f812..fc61a9f63 100644 --- a/infer/tests/endtoend/objc/RetainreleaseTest.java +++ b/infer/tests/endtoend/objc/infer/RetainreleaseTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/ReturnTest.java b/infer/tests/endtoend/objc/infer/ReturnTest.java similarity index 98% rename from infer/tests/endtoend/objc/ReturnTest.java rename to infer/tests/endtoend/objc/infer/ReturnTest.java index 6dda03ff4..57ff5b9a1 100644 --- a/infer/tests/endtoend/objc/ReturnTest.java +++ b/infer/tests/endtoend/objc/infer/ReturnTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsNoErrorInMethod.doesNotContain; diff --git a/infer/tests/endtoend/objc/SkipMethodWithNilObjectTest.java b/infer/tests/endtoend/objc/infer/SkipMethodWithNilObjectTest.java similarity index 98% rename from infer/tests/endtoend/objc/SkipMethodWithNilObjectTest.java rename to infer/tests/endtoend/objc/infer/SkipMethodWithNilObjectTest.java index e00ef73cb..4a53fb98c 100644 --- a/infer/tests/endtoend/objc/SkipMethodWithNilObjectTest.java +++ b/infer/tests/endtoend/objc/infer/SkipMethodWithNilObjectTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/SubtypingTest.java b/infer/tests/endtoend/objc/infer/SubtypingTest.java similarity index 98% rename from infer/tests/endtoend/objc/SubtypingTest.java rename to infer/tests/endtoend/objc/infer/SubtypingTest.java index 28cfc7f9d..7f4abc8f6 100644 --- a/infer/tests/endtoend/objc/SubtypingTest.java +++ b/infer/tests/endtoend/objc/infer/SubtypingTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/SuperTest.java b/infer/tests/endtoend/objc/infer/SuperTest.java similarity index 98% rename from infer/tests/endtoend/objc/SuperTest.java rename to infer/tests/endtoend/objc/infer/SuperTest.java index db524ebe8..6709191f7 100644 --- a/infer/tests/endtoend/objc/SuperTest.java +++ b/infer/tests/endtoend/objc/infer/SuperTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsErrorInMethod.contains; diff --git a/infer/tests/endtoend/objc/Taint2Test.java b/infer/tests/endtoend/objc/infer/Taint2Test.java similarity index 98% rename from infer/tests/endtoend/objc/Taint2Test.java rename to infer/tests/endtoend/objc/infer/Taint2Test.java index 8b7bcc88a..43a2115b6 100644 --- a/infer/tests/endtoend/objc/Taint2Test.java +++ b/infer/tests/endtoend/objc/infer/Taint2Test.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/TaintTest.java b/infer/tests/endtoend/objc/infer/TaintTest.java similarity index 98% rename from infer/tests/endtoend/objc/TaintTest.java rename to infer/tests/endtoend/objc/infer/TaintTest.java index e990bab7c..52be85482 100644 --- a/infer/tests/endtoend/objc/TaintTest.java +++ b/infer/tests/endtoend/objc/infer/TaintTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/TollBridgeTest.java b/infer/tests/endtoend/objc/infer/TollBridgeTest.java similarity index 98% rename from infer/tests/endtoend/objc/TollBridgeTest.java rename to infer/tests/endtoend/objc/infer/TollBridgeTest.java index d657c1bf8..6b7b15537 100644 --- a/infer/tests/endtoend/objc/TollBridgeTest.java +++ b/infer/tests/endtoend/objc/infer/TollBridgeTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.InferError.inferError; diff --git a/infer/tests/endtoend/objc/UpdateDictNPETest.java b/infer/tests/endtoend/objc/infer/UpdateDictNPETest.java similarity index 98% rename from infer/tests/endtoend/objc/UpdateDictNPETest.java rename to infer/tests/endtoend/objc/infer/UpdateDictNPETest.java index 69dc7514f..1f39bdc01 100644 --- a/infer/tests/endtoend/objc/UpdateDictNPETest.java +++ b/infer/tests/endtoend/objc/infer/UpdateDictNPETest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.infer; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; diff --git a/infer/tests/endtoend/objc/AssignPointerTest.java b/infer/tests/endtoend/objc/linters/AssignPointerTest.java similarity index 94% rename from infer/tests/endtoend/objc/AssignPointerTest.java rename to infer/tests/endtoend/objc/linters/AssignPointerTest.java index 55dd942ae..8e53f980e 100644 --- a/infer/tests/endtoend/objc/AssignPointerTest.java +++ b/infer/tests/endtoend/objc/linters/AssignPointerTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.linters; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsLineNumbers.containsLines; @@ -28,7 +28,7 @@ import utils.InferRunner; public class AssignPointerTest { public static final String FILE = - "infer/tests/codetoanalyze/objc/warnings/assign_pointer.m"; + "infer/tests/codetoanalyze/objc/linters/assign_pointer.m"; private static ImmutableList inferCmd; diff --git a/infer/tests/endtoend/objc/AtomicPropertyTest.java b/infer/tests/endtoend/objc/linters/AtomicPropertyTest.java similarity index 94% rename from infer/tests/endtoend/objc/AtomicPropertyTest.java rename to infer/tests/endtoend/objc/linters/AtomicPropertyTest.java index 81e2b428e..54295e8e8 100644 --- a/infer/tests/endtoend/objc/AtomicPropertyTest.java +++ b/infer/tests/endtoend/objc/linters/AtomicPropertyTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.linters; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; @@ -29,7 +29,7 @@ import utils.InferRunner; public class AtomicPropertyTest { public static final String FILE = - "infer/tests/codetoanalyze/objc/warnings/atomic_prop.m"; + "infer/tests/codetoanalyze/objc/linters/atomic_prop.m"; private static ImmutableList inferCmd; diff --git a/infer/tests/endtoend/objc/linters/BUCK b/infer/tests/endtoend/objc/linters/BUCK new file mode 100644 index 000000000..cc5ba4fc0 --- /dev/null +++ b/infer/tests/endtoend/objc/linters/BUCK @@ -0,0 +1,35 @@ +tests_dependencies = [ + '//infer/lib/java/android:android', + '//dependencies/java/guava:guava', + '//dependencies/java/junit:hamcrest', + '//dependencies/java/jackson:jackson', + '//dependencies/java/jsr-305:jsr-305', + '//dependencies/java/junit:junit', + '//dependencies/java/opencsv:opencsv', + '//infer/tests/utils:utils', +] + +objc_linters_test_sources = glob(['*.java']) +objc_linters_test_deps = [] +for test_source in objc_linters_test_sources: + target_name = test_source.replace("/", "_")[:-len(".java")] + objc_linters_test_deps.append(target_name) + + java_test( + name=target_name, + srcs=[test_source], + deps=tests_dependencies, + visibility=[ + 'PUBLIC', + ], + source='7', + target='7', + ) + +java_test( + name='linters', + deps=[':' + x for x in objc_linters_test_deps], + visibility=[ + 'PUBLIC', + ], +) diff --git a/infer/tests/endtoend/objc/RegisteredObserver.java b/infer/tests/endtoend/objc/linters/RegisteredObserver.java similarity index 93% rename from infer/tests/endtoend/objc/RegisteredObserver.java rename to infer/tests/endtoend/objc/linters/RegisteredObserver.java index 521c9ba0f..6148d1cb7 100644 --- a/infer/tests/endtoend/objc/RegisteredObserver.java +++ b/infer/tests/endtoend/objc/linters/RegisteredObserver.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.linters; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; @@ -28,7 +28,7 @@ import utils.InferRunner; public class RegisteredObserver { public static final String VCFile = - "infer/tests/codetoanalyze/objc/errors/registered_observer/ViewController.m"; + "infer/tests/codetoanalyze/objc/linters/registered_observer/ViewController.m"; private static ImmutableList inferCmd; diff --git a/infer/tests/endtoend/objc/RegisteredObserver2.java b/infer/tests/endtoend/objc/linters/RegisteredObserver2.java similarity index 93% rename from infer/tests/endtoend/objc/RegisteredObserver2.java rename to infer/tests/endtoend/objc/linters/RegisteredObserver2.java index e20a96e9f..b06559959 100644 --- a/infer/tests/endtoend/objc/RegisteredObserver2.java +++ b/infer/tests/endtoend/objc/linters/RegisteredObserver2.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.linters; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; @@ -28,7 +28,7 @@ import utils.InferRunner; public class RegisteredObserver2 { public static final String VCFile2 = - "infer/tests/codetoanalyze/objc/errors/registered_observer/ViewController2.m"; + "infer/tests/codetoanalyze/objc/linters/registered_observer/ViewController2.m"; private static ImmutableList inferCmd; diff --git a/infer/tests/endtoend/objc/RegisteredObserver3.java b/infer/tests/endtoend/objc/linters/RegisteredObserver3.java similarity index 93% rename from infer/tests/endtoend/objc/RegisteredObserver3.java rename to infer/tests/endtoend/objc/linters/RegisteredObserver3.java index f39200ac4..875c746e7 100644 --- a/infer/tests/endtoend/objc/RegisteredObserver3.java +++ b/infer/tests/endtoend/objc/linters/RegisteredObserver3.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.linters; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsLineNumbers.containsLines; @@ -28,7 +28,7 @@ import utils.InferRunner; public class RegisteredObserver3 { public static final String VCFile3 = - "infer/tests/codetoanalyze/objc/errors/registered_observer/ViewController3.m"; + "infer/tests/codetoanalyze/objc/linters/registered_observer/ViewController3.m"; private static ImmutableList inferCmd; diff --git a/infer/tests/endtoend/objc/StrongDelegateTest.java b/infer/tests/endtoend/objc/linters/StrongDelegateTest.java similarity index 94% rename from infer/tests/endtoend/objc/StrongDelegateTest.java rename to infer/tests/endtoend/objc/linters/StrongDelegateTest.java index ad7947a1c..8c2aab24a 100644 --- a/infer/tests/endtoend/objc/StrongDelegateTest.java +++ b/infer/tests/endtoend/objc/linters/StrongDelegateTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objc.linters; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsLineNumbers.containsLines; @@ -28,7 +28,7 @@ import utils.InferRunner; public class StrongDelegateTest { public static final String FILE = - "infer/tests/codetoanalyze/objc/warnings/strong_delegate.m"; + "infer/tests/codetoanalyze/objc/linters/strong_delegate.m"; private static ImmutableList inferCmdFraction; diff --git a/infer/tests/endtoend/objcpp/infer/BUCK b/infer/tests/endtoend/objcpp/infer/BUCK new file mode 100644 index 000000000..33652388a --- /dev/null +++ b/infer/tests/endtoend/objcpp/infer/BUCK @@ -0,0 +1,35 @@ +tests_dependencies = [ + '//infer/lib/java/android:android', + '//dependencies/java/guava:guava', + '//dependencies/java/junit:hamcrest', + '//dependencies/java/jackson:jackson', + '//dependencies/java/jsr-305:jsr-305', + '//dependencies/java/junit:junit', + '//dependencies/java/opencsv:opencsv', + '//infer/tests/utils:utils', +] + +objcpp_infer_test_sources = glob(['*.java']) +objcpp_infer_test_deps = [] +for test_source in objcpp_infer_test_sources: + target_name = test_source.replace("/", "_")[:-len(".java")] + objcpp_infer_test_deps.append(target_name) + + java_test( + name=target_name, + srcs=[test_source], + deps=tests_dependencies, + visibility=[ + 'PUBLIC', + ], + source='7', + target='7', + ) + +java_test( + name='infer', + deps=[':' + x for x in objcpp_infer_test_deps], + visibility=[ + 'PUBLIC', + ], +) diff --git a/infer/tests/endtoend/objcpp/linters/BUCK b/infer/tests/endtoend/objcpp/linters/BUCK new file mode 100644 index 000000000..390f608f0 --- /dev/null +++ b/infer/tests/endtoend/objcpp/linters/BUCK @@ -0,0 +1,35 @@ +tests_dependencies = [ + '//infer/lib/java/android:android', + '//dependencies/java/guava:guava', + '//dependencies/java/junit:hamcrest', + '//dependencies/java/jackson:jackson', + '//dependencies/java/jsr-305:jsr-305', + '//dependencies/java/junit:junit', + '//dependencies/java/opencsv:opencsv', + '//infer/tests/utils:utils', +] + +objcpp_linters_test_sources = glob(['*.java']) +objcpp_linters_test_deps = [] +for test_source in objcpp_linters_test_sources: + target_name = test_source.replace("/", "_")[:-len(".java")] + objcpp_linters_test_deps.append(target_name) + + java_test( + name=target_name, + srcs=[test_source], + deps=tests_dependencies, + visibility=[ + 'PUBLIC', + ], + source='7', + target='7', + ) + +java_test( + name='linters', + deps=[':' + x for x in objcpp_linters_test_deps], + visibility=[ + 'PUBLIC', + ], +) diff --git a/infer/tests/endtoend/objc/BlockCaptureCXXRefTest.java b/infer/tests/endtoend/objcpp/linters/BlockCaptureCXXRefTest.java similarity index 91% rename from infer/tests/endtoend/objc/BlockCaptureCXXRefTest.java rename to infer/tests/endtoend/objcpp/linters/BlockCaptureCXXRefTest.java index 0bd75f94a..77012b949 100644 --- a/infer/tests/endtoend/objc/BlockCaptureCXXRefTest.java +++ b/infer/tests/endtoend/objcpp/linters/BlockCaptureCXXRefTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objc; +package endtoend.objcpp.linters; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsExactly.containsExactly; @@ -28,7 +28,8 @@ import utils.InferRunner; public class BlockCaptureCXXRefTest { - public static final String FILE = "infer/tests/codetoanalyze/objcpp/errors/blocks/block.mm"; + public static final String FILE = + "infer/tests/codetoanalyze/objcpp/linters/cxx_reference_in_block/block.mm"; private static ImmutableList inferCmd; diff --git a/infer/tests/endtoend/objcpp/GlobalVarTest.java b/infer/tests/endtoend/objcpp/linters/GlobalVarTest.java similarity index 89% rename from infer/tests/endtoend/objcpp/GlobalVarTest.java rename to infer/tests/endtoend/objcpp/linters/GlobalVarTest.java index d1ae21d7f..8bf95ad74 100644 --- a/infer/tests/endtoend/objcpp/GlobalVarTest.java +++ b/infer/tests/endtoend/objcpp/linters/GlobalVarTest.java @@ -7,7 +7,7 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -package endtoend.objcpp; +package endtoend.objcpp.linters; import static org.hamcrest.MatcherAssert.assertThat; import static utils.matchers.ResultContainsLineNumbers.containsLines; @@ -28,11 +28,12 @@ import utils.InferRunner; public class GlobalVarTest { public static final String FILE = - "infer/tests/codetoanalyze/objcpp/frontend/global-var/B.mm"; + "infer/tests/codetoanalyze/objcpp/linters/global-var/B.mm"; private static ImmutableList inferCmdFraction; - public static final String GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL = "GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL"; + public static final String GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL = + "GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL"; @ClassRule public static DebuggableTemporaryFolder folder =