Source:
public void testSuppress ( ) throws java.lang.Exception { assertEquals ( ( "src/foo/bar/SuppressTest1.java:74: Error: Class requires API level 8 (current min is 1): org.w3c.dom.DOMLocator [NewApi]\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " public void method3(Chronometer chronometer, DOMLocator locator) {\n" + " ~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:76: Error: Call requires API level 11 (current min is 1): android.app.Activity#getActionBar [NewApi]\n" ) + " getActionBar(); // API 11\n" ) + " ~~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:79: Error: Class requires API level 8 (current min is 1): org.w3c.dom.DOMError [NewApi]\n" ) + " DOMError error = null; // API 8\n" ) + " ~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:80: Error: Class requires API level 8 (current min is 1): org.w3c.dom.DOMErrorHandler [NewApi]\n" ) + " Class<?> clz = DOMErrorHandler.class; // API 8\n" ) + " ~~~~~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:83: Error: Call requires API level 3 (current min is 1): android.widget.Chronometer#getOnChronometerTickListener [NewApi]\n" ) + " chronometer.getOnChronometerTickListener(); // API 3\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:86: Error: Call requires API level 11 (current min is 1): android.widget.Chronometer#setTextIsSelectable [NewApi]\n" ) + " chronometer.setTextIsSelectable(true); // API 11\n" ) + " ~~~~~~~~~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:89: Error: Field requires API level 11 (current min is 1): dalvik.bytecode.OpcodeInfo#MAXIMUM_VALUE [NewApi]\n" ) + " int field = OpcodeInfo.MAXIMUM_VALUE; // API 11\n" ) + " ~~~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:94: Error: Class requires API level 14 (current min is 1): android.app.ApplicationErrorReport.BatteryInfo [NewApi]\n" ) + " BatteryInfo batteryInfo = getReport().batteryInfo;\n" ) + " ~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:94: Error: Field requires API level 14 (current min is 1): android.app.ApplicationErrorReport#batteryInfo [NewApi]\n" ) + " BatteryInfo batteryInfo = getReport().batteryInfo;\n" ) + " ~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:97: Error: Field requires API level 11 (current min is 1): android.graphics.PorterDuff.Mode#OVERLAY [NewApi]\n" ) + " Mode mode = PorterDuff.Mode.OVERLAY; // API 11\n" ) + " ~~~~~~~\n" ) + "src/foo/bar/SuppressTest4.java:16: Error: Class requires API level 14 (current min is 1): android.app.ApplicationErrorReport [NewApi]\n" ) + " ApplicationErrorReport report = null;\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest4.java:19: Error: Class requires API level 14 (current min is 1): android.app.ApplicationErrorReport.BatteryInfo [NewApi]\n" ) + " BatteryInfo batteryInfo = report.batteryInfo;\n" ) + " ~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest4.java:19: Error: Field requires API level 14 (current min is 1): android.app.ApplicationErrorReport#batteryInfo [NewApi]\n" ) + " BatteryInfo batteryInfo = report.batteryInfo;\n" ) + " ~~~~~~~~~~~\n" ) + "13 errors, 0 warnings\n" ) ) , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "apicheck/SuppressTest1.java.txt=>src/foo/bar/SuppressTest1.java" , "apicheck/SuppressTest1.class.data=>bin/classes/foo/bar/SuppressTest1.class" , "apicheck/SuppressTest2.java.txt=>src/foo/bar/SuppressTest2.java" , "apicheck/SuppressTest2.class.data=>bin/classes/foo/bar/SuppressTest2.class" , "apicheck/SuppressTest3.java.txt=>src/foo/bar/SuppressTest3.java" , "apicheck/SuppressTest3.class.data=>bin/classes/foo/bar/SuppressTest3.class" , "apicheck/SuppressTest4.java.txt=>src/foo/bar/SuppressTest4.java" , "apicheck/SuppressTest4.class.data=>bin/classes/foo/bar/SuppressTest4.class" ) ) ; }

Target:
public void testSuppress ( ) throws java.lang.Exception { assertEquals ( ( "src/foo/bar/SuppressTest1.java:76: Error: Call requires API level 11 (current min is 1): android.app.Activity#getActionBar [NewApi]\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " getActionBar(); // API 11\n" + " ~~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:80: Error: Class requires API level 8 (current min is 1): org.w3c.dom.DOMErrorHandler [NewApi]\n" ) + " Class<?> clz = DOMErrorHandler.class; // API 8\n" ) + " ~~~~~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:83: Error: Call requires API level 3 (current min is 1): android.widget.Chronometer#getOnChronometerTickListener [NewApi]\n" ) + " chronometer.getOnChronometerTickListener(); // API 3\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:86: Error: Call requires API level 11 (current min is 1): android.widget.Chronometer#setTextIsSelectable [NewApi]\n" ) + " chronometer.setTextIsSelectable(true); // API 11\n" ) + " ~~~~~~~~~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:89: Error: Field requires API level 11 (current min is 1): dalvik.bytecode.OpcodeInfo#MAXIMUM_VALUE [NewApi]\n" ) + " int field = OpcodeInfo.MAXIMUM_VALUE; // API 11\n" ) + " ~~~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:94: Error: Field requires API level 14 (current min is 1): android.app.ApplicationErrorReport#batteryInfo [NewApi]\n" ) + " BatteryInfo batteryInfo = getReport().batteryInfo;\n" ) + " ~~~~~~~~~~~\n" ) + "src/foo/bar/SuppressTest1.java:97: Error: Field requires API level 11 (current min is 1): android.graphics.PorterDuff.Mode#OVERLAY [NewApi]\n" ) + " Mode mode = PorterDuff.Mode.OVERLAY; // API 11\n" ) + " ~~~~~~~\n" ) + "src/foo/bar/SuppressTest4.java:19: Error: Field requires API level 14 (current min is 1): android.app.ApplicationErrorReport#batteryInfo [NewApi]\n" ) + " BatteryInfo batteryInfo = report.batteryInfo;\n" ) + " ~~~~~~~~~~~\n" ) + "8 errors, 0 warnings\n" ) ) , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "apicheck/SuppressTest1.java.txt=>src/foo/bar/SuppressTest1.java" , "apicheck/SuppressTest1.class.data=>bin/classes/foo/bar/SuppressTest1.class" , "apicheck/SuppressTest2.java.txt=>src/foo/bar/SuppressTest2.java" , "apicheck/SuppressTest2.class.data=>bin/classes/foo/bar/SuppressTest2.class" , "apicheck/SuppressTest3.java.txt=>src/foo/bar/SuppressTest3.java" , "apicheck/SuppressTest3.class.data=>bin/classes/foo/bar/SuppressTest3.class" , "apicheck/SuppressTest4.java.txt=>src/foo/bar/SuppressTest4.java" , "apicheck/SuppressTest4.class.data=>bin/classes/foo/bar/SuppressTest4.class" ) ) ; }