Skip to content

Commit

Permalink
Add abstract(GestureRecognizer.invokeCallback) test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
kangwang1988 committed Nov 14, 2020
1 parent 90fb874 commit 6411058
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 22 deletions.
46 changes: 29 additions & 17 deletions aspectd_impl/lib/aop_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import 'package:aspectd/aspectd.dart';
// return obj;
// }
// }
//

// @Aspect()
// @pragma("vm:entry-point")
Expand All @@ -54,7 +53,7 @@ import 'package:aspectd/aspectd.dart';
// return obj;
// }
// }

//
// @Aspect()
// @pragma("vm:entry-point")
// class RegularExecuteDemo {
Expand Down Expand Up @@ -92,19 +91,32 @@ import 'package:aspectd/aspectd.dart';
// return obj;
// }
// }
//
// @Aspect()
// @pragma('vm:entry-point')
// class RegexExecuteDemo {
// @pragma('vm:entry-point')
// RegexExecuteDemo();
//
// @Execute("package:flutter/src/gestures/recognizer.dart","GestureRecognizer","-invokeCallback")
// @pragma("vm:entry-point")
// dynamic hookInvokeCallback(PointCut pointCut){
// print('Aspectd41');
// }
// }

@Aspect()
@pragma("vm:entry-point")
class InjectDemo{
@Inject("package:example/main.dart","","+injectDemo", lineNum:27)
@pragma("vm:entry-point")
static void onInjectDemoHook1() {
print('Aspectd:KWLM41');
}

@Inject("package:example/main.dart","C","+C", lineNum:195)
@pragma("vm:entry-point")
static void onInjectDemoHook3() {
print('Aspectd:KWLM42');
}
}
// @Aspect()
// @pragma("vm:entry-point")
// class InjectDemo{
// @Inject("package:example/main.dart","","+injectDemo", lineNum:27)
// @pragma("vm:entry-point")
// static void onInjectDemoHook1() {
// print('Aspectd:KWLM51');
// }
//
// @Inject("package:example/main.dart","C","+C", lineNum:195)
// @pragma("vm:entry-point")
// static void onInjectDemoHook3() {
// print('Aspectd:KWLM52');
// }
// }
2 changes: 0 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ android {
targetSdkVersion 27
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

buildTypes {
Expand All @@ -55,7 +54,6 @@ flutter {
}

dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
2 changes: 1 addition & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
org.gradle.jvmargs=-Xmx1024m
3 changes: 1 addition & 2 deletions example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip

0 comments on commit 6411058

Please sign in to comment.