MCPcopy Create free account
hub / github.com/ReadyTalk/avian / verifyAppendCharLength

Method verifyAppendCharLength

test/StringBuilderTest.java:36–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34 }
35
36 private static void verifyAppendCharLength() {
37 int iterations = 5000;
38 String fooStr = "foobar";
39 char[] fooChars = new char[fooStr.length()];
40 fooStr.getChars(0, fooStr.length(), fooChars, 0);
41
42 StringBuilder sb = new StringBuilder();
43 for (int i = 0; i < iterations; i++) {
44 for (int j = 0; j < fooChars.length; j++) {
45 sb.append(fooChars[j]);
46 }
47 }
48 String result = sb.toString();
49
50 verify(fooStr, iterations, result);
51 }
52
53 private static void verifySubstring() {
54 String fooStr = "foobar";

Callers 1

mainMethod · 0.95

Calls 5

lengthMethod · 0.95
getCharsMethod · 0.95
appendMethod · 0.95
toStringMethod · 0.95
verifyMethod · 0.95

Tested by

no test coverage detected