List of usage examples for android.os Debug getThreadAllocCount
@Deprecated public static int getThreadAllocCount()
From source file:com.android.tests.lib.UnitTest.java
@Test public void exceptions() { try {/*from w ww .j a va 2s.c om*/ ArrayMap map = new ArrayMap(); map.isEmpty(); fail(); } catch (RuntimeException e) { assertEquals(RuntimeException.class, e.getClass()); assertTrue(e.getMessage().contains("isEmpty")); assertTrue(e.getMessage().contains("not mocked")); assertTrue(e.getMessage().contains("androidstudio/not-mocked")); } try { Debug.getThreadAllocCount(); fail(); } catch (RuntimeException e) { assertEquals(RuntimeException.class, e.getClass()); assertTrue(e.getMessage().contains("getThreadAllocCount")); assertTrue(e.getMessage().contains("not mocked")); assertTrue(e.getMessage().contains("androidstudio/not-mocked")); } }
From source file:com.android.tests.lib.LibUnitTest.java
@Test public void exceptions() { try {//from w w w . j a v a 2s. co m ArrayMap map = new ArrayMap(); map.isEmpty(); fail(); } catch (RuntimeException e) { assertEquals(RuntimeException.class, e.getClass()); assertTrue(e.getMessage().contains("isEmpty")); assertTrue(e.getMessage().contains("not mocked")); } try { Debug.getThreadAllocCount(); fail(); } catch (RuntimeException e) { assertEquals(RuntimeException.class, e.getClass()); assertTrue(e.getMessage().contains("getThreadAllocCount")); assertTrue(e.getMessage().contains("not mocked")); } }