From 69184187d90f126478d2f49415c1e3381217557f Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 13 Sep 2023 05:40:59 +0200 Subject: [PATCH] fix: Account for source patch dependency for tests --- .../annotation/processor/TestPatchAnnotationProcessor.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/revanced-patch-annotation-processor/src/test/kotlin/app/revanced/patcher/patch/annotation/processor/TestPatchAnnotationProcessor.kt b/revanced-patch-annotation-processor/src/test/kotlin/app/revanced/patcher/patch/annotation/processor/TestPatchAnnotationProcessor.kt index 82e6260..f3e2e43 100644 --- a/revanced-patch-annotation-processor/src/test/kotlin/app/revanced/patcher/patch/annotation/processor/TestPatchAnnotationProcessor.kt +++ b/revanced-patch-annotation-processor/src/test/kotlin/app/revanced/patcher/patch/annotation/processor/TestPatchAnnotationProcessor.kt @@ -80,15 +80,17 @@ class TestPatchAnnotationProcessor { // endregion // region Limitations + @Test - fun failingManualDependency() = assertNull( + fun failingManualDependency() = assertEquals( + 1, // Generated patch is always dependent on source class. compile( getSourceFile( "limitations/manualdependency", "DependentPatch" ), getSourceFile( "limitations/manualdependency", "DependencyPatch" ) - ).loadPatch("$SAMPLE_PACKAGE.limitations.manualdependency.DependentPatchGenerated").dependencies + ).loadPatch("$SAMPLE_PACKAGE.limitations.manualdependency.DependentPatchGenerated").dependencies!!.size ) // endregion