File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
sources/net.sf.j2s.java.core/src/test Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,15 @@ public static void main(String[] args) {
4040 String st = "test\n ing\r \n now" ;
4141 String [] lines = st .split ("\n " );
4242 int [] ptr = new int [1 ];
43+ long n = 0 ;
4344 if (/** @j2sNative true || */
4445 false ) {
46+ String s = "\u0000 test" ;
47+ assert (s .trim ().length () == 4 );
48+ n = (/** @j2sNative s.strip$().length || */ 0 );
49+ System .out .println ("strip gives length " + n );
50+ assert (n == 5 );
51+
4552 // this is Java 11, so JavaScript-only test here
4653 Stream <String > o = /** @j2sNative st.lines$() || */
4754 null ;
@@ -89,7 +96,6 @@ public void accept(String value) {
8996 Consumer <Integer > cc = param ::set ;
9097 Supplier <Integer > sup = param ::get ;
9198
92- long n ;
9399 StringBuffer sb = new StringBuffer ("test" );
94100 System .out .println ("below is 'test'? " + sb );
95101 sb .chars ().mapToObj (i -> (char ) i ).forEach (System .out ::print );
You can’t perform that action at this time.
0 commit comments