Source:
public void testTypeDef ( ) throws java.lang.Exception { assertEquals ( ( ( "" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "src/test/pkg/IntDefTest.java:31: Error: Must be one of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" + " setStyle(0, 0); // ERROR\n" ) + " ~\n" ) + "src/test/pkg/IntDefTest.java:32: Error: Must be one of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setStyle(-1, 0); // ERROR\n" ) + " ~~\n" ) + "src/test/pkg/IntDefTest.java:33: Error: Must be one of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setStyle(UNRELATED, 0); // ERROR\n" ) + " ~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:34: Error: Must be one of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setStyle(IntDefTest.UNRELATED, 0); // ERROR\n" ) + " ~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:35: Error: Flag not allowed here [WrongConstant]\n" ) + " setStyle(IntDefTest.STYLE_NORMAL|STYLE_NO_FRAME, 0); // ERROR: Not a flag\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:36: Error: Flag not allowed here [WrongConstant]\n" ) + " setStyle(~STYLE_NO_FRAME, 0); // ERROR: Not a flag\n" ) + " ~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:55: Error: Must be one or more of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setFlags(\"\", UNRELATED); // ERROR\n" ) + " ~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:56: Error: Must be one or more of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setFlags(\"\", UNRELATED|STYLE_NO_TITLE); // ERROR\n" ) + " ~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:57: Error: Must be one or more of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setFlags(\"\", STYLE_NORMAL|STYLE_NO_TITLE|UNRELATED); // ERROR\n" ) + " ~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:58: Error: Must be one or more of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setFlags(\"\", 1); // ERROR\n" ) + " ~\n" ) + "src/test/pkg/IntDefTest.java:59: Error: Must be one or more of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setFlags(\"\", arg < 0 ? STYLE_NORMAL : UNRELATED); // ERROR\n" ) + " ~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:60: Error: Must be one or more of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setFlags(\"\", arg < 0 ? UNRELATED : STYLE_NORMAL); // ERROR\n" ) + " ~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:79: Error: Must be one of: IntDefTest.TYPE_1, IntDefTest.TYPE_2 [WrongConstant]\n" ) + " setTitle(\"\", UNRELATED_TYPE); // ERROR\n" ) + " ~~~~~~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:80: Error: Must be one of: IntDefTest.TYPE_1, IntDefTest.TYPE_2 [WrongConstant]\n" ) + " setTitle(\"\", \"type2\"); // ERROR\n" ) + " ~~~~~~~\n" ) ) + ( com.android.tools.lint.checks.SupportAnnotationDetectorTest.SDK_ANNOTATIONS_AVAILABLE ? "src/test/pkg/IntDefTest.java:99: Error: Must be one of: View.LAYOUT_DIRECTION_LTR, View.LAYOUT_DIRECTION_RTL, View.LAYOUT_DIRECTION_INHERIT, View.LAYOUT_DIRECTION_LOCAL [WrongConstant]\n" + ( ( ( ( ( ( ( ( ( ( ( " view.setLayoutDirection(View.TEXT_DIRECTION_LTR); // ERROR\n" + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:100: Error: Must be one of: View.LAYOUT_DIRECTION_LTR, View.LAYOUT_DIRECTION_RTL, View.LAYOUT_DIRECTION_INHERIT, View.LAYOUT_DIRECTION_LOCAL [WrongConstant]\n" ) + " view.setLayoutDirection(0); // ERROR\n" ) + " ~\n" ) + "src/test/pkg/IntDefTest.java:101: Error: Flag not allowed here [WrongConstant]\n" ) + " view.setLayoutDirection(View.LAYOUT_DIRECTION_LTR|View.LAYOUT_DIRECTION_RTL); // ERROR\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:102: Error: Must be one of: Context.POWER_SERVICE, Context.WINDOW_SERVICE, Context.LAYOUT_INFLATER_SERVICE, Context.ACCOUNT_SERVICE, Context.ACTIVITY_SERVICE, Context.ALARM_SERVICE, Context.NOTIFICATION_SERVICE, Context.ACCESSIBILITY_SERVICE, Context.CAPTIONING_SERVICE, Context.KEYGUARD_SERVICE, Context.LOCATION_SERVICE, Context.SEARCH_SERVICE, Context.SENSOR_SERVICE, Context.STORAGE_SERVICE, Context.WALLPAPER_SERVICE, Context.VIBRATOR_SERVICE, Context.CONNECTIVITY_SERVICE, Context.WIFI_SERVICE, Context.WIFI_P2P_SERVICE, Context.NSD_SERVICE, Context.AUDIO_SERVICE, Context.MEDIA_ROUTER_SERVICE, Context.TELEPHONY_SERVICE, Context.TELECOM_SERVICE, Context.CLIPBOARD_SERVICE, Context.INPUT_METHOD_SERVICE, Context.TEXT_SERVICES_MANAGER_SERVICE, Context.APPWIDGET_SERVICE, Context.DROPBOX_SERVICE, Context.DEVICE_POLICY_SERVICE, Context.UI_MODE_SERVICE, Context.DOWNLOAD_SERVICE, Context.NFC_SERVICE, Context.BLUETOOTH_SERVICE, Context.USB_SERVICE, Context.LAUNCHER_APPS_SERVICE, Context.INPUT_SERVICE, Context.DISPLAY_SERVICE, Context.USER_SERVICE, Context.RESTRICTIONS_SERVICE, Context.APP_OPS_SERVICE, Context.CAMERA_SERVICE, Context.PRINT_SERVICE, Context.CONSUMER_IR_SERVICE, Context.TV_INPUT_SERVICE, Context.MEDIA_SESSION_SERVICE, Context.BATTERY_SERVICE, Context.JOB_SCHEDULER_SERVICE, Context.MEDIA_PROJECTION_SERVIC [WrongConstant]\n" ) + " context.getSystemService(TYPE_1); // ERROR\n" ) + " ~~~~~~\n" ) + "18 errors, 0 warnings\n" ) : "14 errors, 0 warnings\n" ) ) , lintProject ( "src/test/pkg/IntDefTest.java.txt=>src/test/pkg/IntDefTest.java" , "src/android/support/annotation/IntDef.java.txt=>src/android/support/annotation/IntDef.java" , "src/android/support/annotation/StringDef.java.txt=>src/android/support/annotation/StringDef.java" ) ) ; }

Target:
public void testTypeDef ( ) throws java.lang.Exception { assertEquals ( ( ( "" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "src/test/pkg/IntDefTest.java:31: Error: Must be one of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" + " setStyle(0, 0); // ERROR\n" ) + " ~\n" ) + "src/test/pkg/IntDefTest.java:32: Error: Must be one of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setStyle(-1, 0); // ERROR\n" ) + " ~~\n" ) + "src/test/pkg/IntDefTest.java:33: Error: Must be one of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setStyle(UNRELATED, 0); // ERROR\n" ) + " ~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:34: Error: Must be one of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setStyle(IntDefTest.UNRELATED, 0); // ERROR\n" ) + " ~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:35: Error: Flag not allowed here [WrongConstant]\n" ) + " setStyle(IntDefTest.STYLE_NORMAL|STYLE_NO_FRAME, 0); // ERROR: Not a flag\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:36: Error: Flag not allowed here [WrongConstant]\n" ) + " setStyle(~STYLE_NO_FRAME, 0); // ERROR: Not a flag\n" ) + " ~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:55: Error: Must be one or more of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setFlags(\"\", UNRELATED); // ERROR\n" ) + " ~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:56: Error: Must be one or more of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setFlags(\"\", UNRELATED|STYLE_NO_TITLE); // ERROR\n" ) + " ~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:57: Error: Must be one or more of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setFlags(\"\", STYLE_NORMAL|STYLE_NO_TITLE|UNRELATED); // ERROR\n" ) + " ~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:58: Error: Must be one or more of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setFlags(\"\", 1); // ERROR\n" ) + " ~\n" ) + "src/test/pkg/IntDefTest.java:59: Error: Must be one or more of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setFlags(\"\", arg < 0 ? STYLE_NORMAL : UNRELATED); // ERROR\n" ) + " ~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:60: Error: Must be one or more of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setFlags(\"\", arg < 0 ? UNRELATED : STYLE_NORMAL); // ERROR\n" ) + " ~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:79: Error: Must be one of: IntDefTest.TYPE_1, IntDefTest.TYPE_2 [WrongConstant]\n" ) + " setTitle(\"\", UNRELATED_TYPE); // ERROR\n" ) + " ~~~~~~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:80: Error: Must be one of: IntDefTest.TYPE_1, IntDefTest.TYPE_2 [WrongConstant]\n" ) + " setTitle(\"\", \"type2\"); // ERROR\n" ) + " ~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:87: Error: Must be one of: IntDefTest.TYPE_1, IntDefTest.TYPE_2 [WrongConstant]\n" ) + " setTitle(\"\", type); // ERROR\n" ) + " ~~~~\n" ) + "src/test/pkg/IntDefTest.java:92: Error: Must be one or more of: IntDefTest.STYLE_NORMAL, IntDefTest.STYLE_NO_TITLE, IntDefTest.STYLE_NO_FRAME, IntDefTest.STYLE_NO_INPUT [WrongConstant]\n" ) + " setFlags(\"\", flag); // ERROR\n" ) + " ~~~~\n" ) ) + ( com.android.tools.lint.checks.SupportAnnotationDetectorTest.SDK_ANNOTATIONS_AVAILABLE ? "src/test/pkg/IntDefTest.java:99: Error: Must be one of: View.LAYOUT_DIRECTION_LTR, View.LAYOUT_DIRECTION_RTL, View.LAYOUT_DIRECTION_INHERIT, View.LAYOUT_DIRECTION_LOCAL [WrongConstant]\n" + ( ( ( ( ( ( ( ( ( ( ( " view.setLayoutDirection(View.TEXT_DIRECTION_LTR); // ERROR\n" + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:100: Error: Must be one of: View.LAYOUT_DIRECTION_LTR, View.LAYOUT_DIRECTION_RTL, View.LAYOUT_DIRECTION_INHERIT, View.LAYOUT_DIRECTION_LOCAL [WrongConstant]\n" ) + " view.setLayoutDirection(0); // ERROR\n" ) + " ~\n" ) + "src/test/pkg/IntDefTest.java:101: Error: Flag not allowed here [WrongConstant]\n" ) + " view.setLayoutDirection(View.LAYOUT_DIRECTION_LTR|View.LAYOUT_DIRECTION_RTL); // ERROR\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/IntDefTest.java:102: Error: Must be one of: Context.POWER_SERVICE, Context.WINDOW_SERVICE, Context.LAYOUT_INFLATER_SERVICE, Context.ACCOUNT_SERVICE, Context.ACTIVITY_SERVICE, Context.ALARM_SERVICE, Context.NOTIFICATION_SERVICE, Context.ACCESSIBILITY_SERVICE, Context.CAPTIONING_SERVICE, Context.KEYGUARD_SERVICE, Context.LOCATION_SERVICE, Context.SEARCH_SERVICE, Context.SENSOR_SERVICE, Context.STORAGE_SERVICE, Context.WALLPAPER_SERVICE, Context.VIBRATOR_SERVICE, Context.CONNECTIVITY_SERVICE, Context.WIFI_SERVICE, Context.WIFI_P2P_SERVICE, Context.NSD_SERVICE, Context.AUDIO_SERVICE, Context.MEDIA_ROUTER_SERVICE, Context.TELEPHONY_SERVICE, Context.TELECOM_SERVICE, Context.CLIPBOARD_SERVICE, Context.INPUT_METHOD_SERVICE, Context.TEXT_SERVICES_MANAGER_SERVICE, Context.APPWIDGET_SERVICE, Context.DROPBOX_SERVICE, Context.DEVICE_POLICY_SERVICE, Context.UI_MODE_SERVICE, Context.DOWNLOAD_SERVICE, Context.NFC_SERVICE, Context.BLUETOOTH_SERVICE, Context.USB_SERVICE, Context.LAUNCHER_APPS_SERVICE, Context.INPUT_SERVICE, Context.DISPLAY_SERVICE, Context.USER_SERVICE, Context.RESTRICTIONS_SERVICE, Context.APP_OPS_SERVICE, Context.CAMERA_SERVICE, Context.PRINT_SERVICE, Context.CONSUMER_IR_SERVICE, Context.TV_INPUT_SERVICE, Context.MEDIA_SESSION_SERVICE, Context.BATTERY_SERVICE, Context.JOB_SCHEDULER_SERVICE, Context.MEDIA_PROJECTION_SERVIC [WrongConstant]\n" ) + " context.getSystemService(TYPE_1); // ERROR\n" ) + " ~~~~~~\n" ) + "20 errors, 0 warnings\n" ) : "16 errors, 0 warnings\n" ) ) , lintProject ( "src/test/pkg/IntDefTest.java.txt=>src/test/pkg/IntDefTest.java" , "src/android/support/annotation/IntDef.java.txt=>src/android/support/annotation/IntDef.java" , "src/android/support/annotation/StringDef.java.txt=>src/android/support/annotation/StringDef.java" ) ) ; }