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) {
40
40
String st = "test\n ing\r \n now" ;
41
41
String [] lines = st .split ("\n " );
42
42
int [] ptr = new int [1 ];
43
+ long n = 0 ;
43
44
if (/** @j2sNative true || */
44
45
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
+
45
52
// this is Java 11, so JavaScript-only test here
46
53
Stream <String > o = /** @j2sNative st.lines$() || */
47
54
null ;
@@ -89,7 +96,6 @@ public void accept(String value) {
89
96
Consumer <Integer > cc = param ::set ;
90
97
Supplier <Integer > sup = param ::get ;
91
98
92
- long n ;
93
99
StringBuffer sb = new StringBuffer ("test" );
94
100
System .out .println ("below is 'test'? " + sb );
95
101
sb .chars ().mapToObj (i -> (char ) i ).forEach (System .out ::print );
You can’t perform that action at this time.
0 commit comments