StackFrame implements CharSequence, GenericStackElement { @Override public String toString() { return toString(this); } StackFrame(StackTraceElement ste);  StackFrame(String classPrefix, String className, String methodName, String fileName, int lineNumber); String getClassName(); String getMethodName(); String getSourceFile(); int getLineNumber(); boolean isNative(); StackFrame internSymbols(); @Override int length(); @Override char charAt(int index); @Override CharSequence subSequence(int start, int end); @Override int hashCode(); @Override boolean equals(Object obj); StackFrame withoutSource(); StackTraceElement toStackTraceElement(); @Override String toString(); void toString(StringBuilder builder); static StackFrame parseFrame(String line); static final Comparator<StackFrame> COMPARATOR; }
@Test public void test_normal_frame_at_1() { StackTraceElement ste = new StackTraceElement("MyClass", "myMethod", "MyClass.java", 1); StackFrame frame = new StackFrame(ste); Assert.assertEquals(ste.toString(), frame.toString()); }
@Test public void test_normal_frame_at_5() { StackTraceElement ste = new StackTraceElement("MyClass", "myMethod", "MyClass.java", 5); StackFrame frame = new StackFrame(ste); Assert.assertEquals(ste.toString(), frame.toString()); }
@Test public void test_normal_frame_at_10() { StackTraceElement ste = new StackTraceElement("MyClass", "myMethod", "MyClass.java", 10); StackFrame frame = new StackFrame(ste); Assert.assertEquals(ste.toString(), frame.toString()); }
@Test public void test_normal_frame_at_15() { StackTraceElement ste = new StackTraceElement("MyClass", "myMethod", "MyClass.java", 15); StackFrame frame = new StackFrame(ste); Assert.assertEquals(ste.toString(), frame.toString()); }
@Test public void test_normal_frame_at_100() { StackTraceElement ste = new StackTraceElement("MyClass", "myMethod", "MyClass.java", 100); StackFrame frame = new StackFrame(ste); Assert.assertEquals(ste.toString(), frame.toString()); }
@Test public void test_normal_frame_at_500() { StackTraceElement ste = new StackTraceElement("mypackage.MyClass", "myMethod", "MyClass.java", 500); StackFrame frame = new StackFrame(ste); Assert.assertEquals(ste.toString(), frame.toString()); }
@Test public void test_no_line_frame() { StackTraceElement ste = new StackTraceElement("MyClass", "myMethod", "MyClass.java", -1); StackFrame frame = new StackFrame(ste); Assert.assertEquals(ste.toString(), frame.toString()); }
@Test public void test_no_source_frame() { StackTraceElement ste = new StackTraceElement("MyClass", "myMethod", null, -1); StackFrame frame = new StackFrame(ste); Assert.assertEquals(ste.toString(), frame.toString()); }
@Test public void test_native_frame() { StackTraceElement ste = new StackTraceElement("MyClass", "myMethod", null, -2); StackFrame frame = new StackFrame(ste); Assert.assertEquals(ste.toString(), frame.toString()); }
@Test public void test_native_frame2() { StackTraceElement ste = new StackTraceElement("MyClass", "myMethod", "myclass.cpp", -2); StackFrame frame = new StackFrame(ste); Assert.assertEquals(ste.toString(), frame.toString()); }
@Test public void test_class_prefix() { StackTraceElement ste = new StackTraceElement("mypackage.MyClass", "myMethod", "MyClass.java", 15); StackFrame frame = new StackFrame("mypackage", "MyClass", "myMethod", "MyClass.java", 15); Assert.assertEquals(ste.toString(), frame.toString()); }