diff options
author | Eric Rowe <erowe@google.com> | 2015-05-07 16:03:40 -0700 |
---|---|---|
committer | Eric Rowe <erowe@google.com> | 2015-05-07 17:12:58 -0700 |
commit | 45eae46848a8ce314029a718ff5e5bded76fe3ce (patch) | |
tree | 74f5a00587e7d87312f1c9fd34b3d0170ae4e3dc /tests | |
parent | ca0291775a05e7800dae05cb31db7f1702b44348 (diff) | |
download | loganalysis-45eae46848a8ce314029a718ff5e5bded76fe3ce.tar.gz |
Resume at "beginning of main"
Change-Id: Ib73fe8215bf5b9cf8cd6dd58c54eb481c38cc483
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/loganalysis/parser/LogcatParserTest.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/src/com/android/loganalysis/parser/LogcatParserTest.java b/tests/src/com/android/loganalysis/parser/LogcatParserTest.java index 2b521a1..aa669de 100644 --- a/tests/src/com/android/loganalysis/parser/LogcatParserTest.java +++ b/tests/src/com/android/loganalysis/parser/LogcatParserTest.java @@ -607,6 +607,26 @@ public class LogcatParserTest extends TestCase { assertEquals(parseTime("2012-04-25 09:59:47.799"), logcat.getStopTime()); assertEquals(1, logcat.getEvents().size()); assertEquals("java.lang.Exception2", logcat.getJavaCrashes().get(0).getException()); + + lines = Arrays.asList( + "04-25 09:15:47.799 123 3082 I ShutdownThread: Rebooting, reason: null", + "04-25 09:55:47.799 3064 3082 E AndroidRuntime: java.lang.Exception", + "04-25 09:55:47.799 3064 3082 E AndroidRuntime: \tat class.method1(Class.java:1)", + "04-25 09:55:47.799 3064 3082 E AndroidRuntime: \tat class.method2(Class.java:2)", + "04-25 09:55:47.799 3064 3082 E AndroidRuntime: \tat class.method3(Class.java:3)", + "logcat interrupted. May see duplicated content in log.--------- beginning of main", + "04-25 09:59:47.799 3064 3082 E AndroidRuntime: java.lang.Exception2", + "04-25 09:59:47.799 3064 3082 E AndroidRuntime: \tat class.method1(Class.java:1)", + "04-25 09:59:47.799 3064 3082 E AndroidRuntime: \tat class.method2(Class.java:2)", + "04-25 09:59:47.799 3064 3082 E AndroidRuntime: \tat class.method3(Class.java:3)"); + + + logcat = new LogcatParser("2012").parse(lines); + assertNotNull(logcat); + assertEquals(parseTime("2012-04-25 09:15:47.799"), logcat.getStartTime()); + assertEquals(parseTime("2012-04-25 09:59:47.799"), logcat.getStopTime()); + assertEquals(1, logcat.getEvents().size()); + assertEquals("java.lang.Exception2", logcat.getJavaCrashes().get(0).getException()); } /** |