(t *testing.T)
| 35 | NewCompiler().Compiler(script) |
| 36 | } |
| 37 | func TestStringBuilder(t *testing.T) { |
| 38 | script := ` |
| 39 | StringBuilder b = StringBuilder(); |
| 40 | b.writeString("10"); |
| 41 | b.writeString("20"); |
| 42 | int l = b.writeString("30"); |
| 43 | string s = b.String(); |
| 44 | printf("s:%s, len=%d ",s,l); |
| 45 | assertEqual(s,"102030"); |
| 46 | byte[] b2 = toByteArray("40"); |
| 47 | b.WriteBytes(b2); |
| 48 | s = b.String(); |
| 49 | assertEqual(s,"10203040"); |
| 50 | println(s); |
| 51 | ` |
| 52 | NewCompiler().Compiler(script) |
| 53 | } |
| 54 | func TestStringBuilder3(t *testing.T) { |
| 55 | script := ` |
| 56 | Strings s = Strings(); |
nothing calls this directly
no test coverage detected