def testMainDexAnnotation(self): mainDexEntries = [ '@MainDex public class Test {', '@MainDex public class Test{', """@MainDex public class Test { """, """@MainDex public class Test { """, '@MainDex /* This class is a test */ public class Test {', '@MainDex public class Test implements java.io.Serializable {', '@MainDex public class Test implements java.io.Serializable, Bidule {', '@MainDex public class Test extends BaseTest {', """@MainDex public class Test extends BaseTest implements Bidule { """, """@MainDex public class Test extends BaseTest implements Bidule, Machin, Chose { """, """@MainDex public class Test implements Testable<java.io.Serializable> { """, '@MainDex public class Test implements Testable<java.io.Serializable> {', '@MainDex public class Test extends Testable<java.io.Serializable> {', ] for entry in mainDexEntries: self.assertEquals(True, IsMainDexJavaClass(entry))
def testNoMainDexAnnotation(self): noMainDexEntries = [ 'public class Test {', '@NotMainDex public class Test {', 'public class Test implements java.io.Serializable {', 'public class Test extends BaseTest {' ] for entry in noMainDexEntries: self.assertEquals("false", IsMainDexJavaClass(entry))