mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
bind: fix error type
Errors was recently converted to use objects as representation instead of strings. Issue golang/go#17073 exposed a few places that wasn't properly updated. Fix them and add the test case from the the issue. Fixes golang/go#17073 Change-Id: I0191993a8427d930540716407fc09032f282fc66 Reviewed-on: https://go-review.googlesource.com/29176 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
@@ -418,9 +418,9 @@ public class SeqTest extends InstrumentationTestCase {
|
||||
public void testErrorField() {
|
||||
final String want = "an error message";
|
||||
Node n = Testpkg.newNode("ErrTest");
|
||||
n.setErr(want);
|
||||
String got = n.getErr();
|
||||
assertEquals("want back the error message we set", want, got);
|
||||
n.setErr(new Exception(want));
|
||||
Exception got = n.getErr();
|
||||
assertEquals("want back the error message we set", want, got.getMessage());
|
||||
}
|
||||
|
||||
//test if we have JNI local reference table overflow error
|
||||
|
||||
Reference in New Issue
Block a user