bind/java: do not return null String for empty Go string

Fixes golang/go#13430

Change-Id: Ic018761af6a40f6b04ec4449110f54af8f543a53
Reviewed-on: https://go-review.googlesource.com/17273
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Hyang-Ah Hana Kim
2015-12-01 20:12:01 +00:00
parent 01216d9779
commit 0a581ceb1e
7 changed files with 16 additions and 9 deletions
+7
View File
@@ -81,6 +81,13 @@ public class SeqTest extends AndroidTestCase {
String want = "a short string";
String got = Testpkg.StrDup(want);
assertEquals("Strings should match", want, got);
want = "";
got = Testpkg.StrDup(want);
assertEquals("Strings should match (empty string)", want, got);
got = Testpkg.StrDup(null);
assertEquals("Strings should match (null string)", want, got);
}
public void testLongString() {