author | shade |
Tue, 02 Feb 2016 18:15:15 +0300 | |
changeset 35639 | f34e7e8b4eac |
parent 35388 | a33a232cf7b7 |
permissions | -rw-r--r-- |
35388 | 1 |
/* |
2 |
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. |
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
23 |
||
24 |
/** |
|
25 |
* @test |
|
26 |
* @summary Test implicit String concatenations with lots of arguments (two-slot version) |
|
27 |
* |
|
28 |
* @compile ImplicitStringConcatManyLongs.java |
|
35639
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
29 |
* @run main/othervm -Xverify:all ImplicitStringConcatManyLongs |
35388 | 30 |
* |
31 |
* @compile -XDstringConcat=inline ImplicitStringConcatManyLongs.java |
|
35639
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
32 |
* @run main/othervm -Xverify:all ImplicitStringConcatManyLongs |
35388 | 33 |
* |
34 |
* @compile -XDstringConcat=indy -source 1.9 -target 1.9 ImplicitStringConcatManyLongs.java |
|
35 |
* |
|
35639
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
36 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
37 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
38 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
39 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
40 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
41 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatManyLongs |
35388 | 42 |
* |
35639
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
43 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
44 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
45 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
46 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
47 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
48 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs |
35388 | 49 |
* |
35639
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
50 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
51 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
52 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
53 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
54 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
55 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
35388 | 56 |
|
35639
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
57 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
58 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
59 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
60 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
61 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
62 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
35388 | 63 |
* |
64 |
* @compile -XDstringConcat=indyWithConstants -source 1.9 -target 1.9 ImplicitStringConcatManyLongs.java |
|
65 |
* |
|
35639
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
66 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
67 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
68 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
69 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
70 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
71 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT ImplicitStringConcatManyLongs |
35388 | 72 |
* |
35639
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
73 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
74 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
75 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
76 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
77 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
78 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true ImplicitStringConcatManyLongs |
35388 | 79 |
* |
35639
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
80 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
81 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
82 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
83 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
84 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
85 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
35388 | 86 |
* |
35639
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
87 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
88 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
89 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
90 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=BC_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
91 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_SB_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
f34e7e8b4eac
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested
shade
parents:
35388
diff
changeset
|
92 |
* @run main/othervm -Xverify:all -Djava.lang.invoke.stringConcat=MH_INLINE_SIZED_EXACT -Djava.lang.invoke.stringConcat.debug=true -Djava.lang.invoke.stringConcat.cache=true ImplicitStringConcatManyLongs |
35388 | 93 |
*/ |
94 |
||
95 |
import java.lang.reflect.Field; |
|
96 |
import java.lang.reflect.Modifier; |
|
97 |
||
98 |
public class ImplicitStringConcatManyLongs { |
|
99 |
||
100 |
static long s000, s001, s002, s003, s004, s005, s006, s007, s008, s009; |
|
101 |
static long s010, s011, s012, s013, s014, s015, s016, s017, s018, s019; |
|
102 |
static long s020, s021, s022, s023, s024, s025, s026, s027, s028, s029; |
|
103 |
static long s030, s031, s032, s033, s034, s035, s036, s037, s038, s039; |
|
104 |
static long s040, s041, s042, s043, s044, s045, s046, s047, s048, s049; |
|
105 |
static long s050, s051, s052, s053, s054, s055, s056, s057, s058, s059; |
|
106 |
static long s060, s061, s062, s063, s064, s065, s066, s067, s068, s069; |
|
107 |
static long s070, s071, s072, s073, s074, s075, s076, s077, s078, s079; |
|
108 |
static long s080, s081, s082, s083, s084, s085, s086, s087, s088, s089; |
|
109 |
static long s090, s091, s092, s093, s094, s095, s096, s097, s098, s099; |
|
110 |
||
111 |
static long s100, s101, s102, s103, s104, s105, s106, s107, s108, s109; |
|
112 |
static long s110, s111, s112, s113, s114, s115, s116, s117, s118, s119; |
|
113 |
static long s120, s121, s122, s123, s124, s125, s126, s127, s128, s129; |
|
114 |
static long s130, s131, s132, s133, s134, s135, s136, s137, s138, s139; |
|
115 |
static long s140, s141, s142, s143, s144, s145, s146, s147, s148, s149; |
|
116 |
static long s150, s151, s152, s153, s154, s155, s156, s157, s158, s159; |
|
117 |
static long s160, s161, s162, s163, s164, s165, s166, s167, s168, s169; |
|
118 |
static long s170, s171, s172, s173, s174, s175, s176, s177, s178, s179; |
|
119 |
static long s180, s181, s182, s183, s184, s185, s186, s187, s188, s189; |
|
120 |
static long s190, s191, s192, s193, s194, s195, s196, s197, s198, s199; |
|
121 |
||
122 |
static long s200, s201, s202, s203, s204, s205, s206, s207, s208, s209; |
|
123 |
static long s210, s211, s212, s213, s214, s215, s216, s217, s218, s219; |
|
124 |
static long s220, s221, s222, s223, s224, s225, s226, s227, s228, s229; |
|
125 |
static long s230, s231, s232, s233, s234, s235, s236, s237, s238, s239; |
|
126 |
static long s240, s241, s242, s243, s244, s245, s246, s247, s248, s249; |
|
127 |
static long s250, s251, s252, s253, s254, s255, s256, s257, s258, s259; |
|
128 |
static long s260, s261, s262, s263, s264, s265, s266, s267, s268, s269; |
|
129 |
static long s270, s271, s272, s273, s274, s275, s276, s277, s278, s279; |
|
130 |
static long s280, s281, s282, s283, s284, s285, s286, s287, s288, s289; |
|
131 |
static long s290, s291, s292, s293, s294, s295, s296, s297, s298, s299; |
|
132 |
||
133 |
static { |
|
134 |
for (Field f : ImplicitStringConcatManyLongs.class.getDeclaredFields()) { |
|
135 |
if (Modifier.isStatic(f.getModifiers())) { |
|
136 |
String name = f.getName(); |
|
137 |
try { |
|
138 |
f.set(null, Long.valueOf(name.substring(1))); |
|
139 |
} catch (IllegalAccessException e) { |
|
140 |
throw new IllegalStateException(e); |
|
141 |
} |
|
142 |
} |
|
143 |
} |
|
144 |
} |
|
145 |
||
146 |
public static void main(String[] args) throws Exception { |
|
147 |
String res = "" + |
|
148 |
s000 + s001 + s002 + s003 + s004 + s005 + s006 + s007 + s008 + s009 + |
|
149 |
s010 + s011 + s012 + s013 + s014 + s015 + s016 + s017 + s018 + s019 + |
|
150 |
s020 + s021 + s022 + s023 + s024 + s025 + s026 + s027 + s028 + s029 + |
|
151 |
s030 + s031 + s032 + s033 + s034 + s035 + s036 + s037 + s038 + s039 + |
|
152 |
s040 + s041 + s042 + s043 + s044 + s045 + s046 + s047 + s048 + s049 + |
|
153 |
s050 + s051 + s052 + s053 + s054 + s055 + s056 + s057 + s058 + s059 + |
|
154 |
s060 + s061 + s062 + s063 + s064 + s065 + s066 + s067 + s068 + s069 + |
|
155 |
s070 + s071 + s072 + s073 + s074 + s075 + s076 + s077 + s078 + s079 + |
|
156 |
s080 + s081 + s082 + s083 + s084 + s085 + s086 + s087 + s088 + s089 + |
|
157 |
s090 + s091 + s092 + s093 + s094 + s095 + s096 + s097 + s098 + s099 + |
|
158 |
||
159 |
s100 + s101 + s102 + s103 + s104 + s105 + s106 + s107 + s108 + s109 + |
|
160 |
s110 + s111 + s112 + s113 + s114 + s115 + s116 + s117 + s118 + s119 + |
|
161 |
s120 + s121 + s122 + s123 + s124 + s125 + s126 + s127 + s128 + s129 + |
|
162 |
s130 + s131 + s132 + s133 + s134 + s135 + s136 + s137 + s138 + s139 + |
|
163 |
s140 + s141 + s142 + s143 + s144 + s145 + s146 + s147 + s148 + s149 + |
|
164 |
s150 + s151 + s152 + s153 + s154 + s155 + s156 + s157 + s158 + s159 + |
|
165 |
s160 + s161 + s162 + s163 + s164 + s165 + s166 + s167 + s168 + s169 + |
|
166 |
s170 + s171 + s172 + s173 + s174 + s175 + s176 + s177 + s178 + s179 + |
|
167 |
s180 + s181 + s182 + s183 + s184 + s185 + s186 + s187 + s188 + s189 + |
|
168 |
s190 + s191 + s192 + s193 + s194 + s195 + s196 + s197 + s198 + s199 + |
|
169 |
||
170 |
s200 + s201 + s202 + s203 + s204 + s205 + s206 + s207 + s208 + s209 + |
|
171 |
s210 + s211 + s212 + s213 + s214 + s215 + s216 + s217 + s218 + s219 + |
|
172 |
s220 + s221 + s222 + s223 + s224 + s225 + s226 + s227 + s228 + s229 + |
|
173 |
s230 + s231 + s232 + s233 + s234 + s235 + s236 + s237 + s238 + s239 + |
|
174 |
s240 + s241 + s242 + s243 + s244 + s245 + s246 + s247 + s248 + s249 + |
|
175 |
s250 + s251 + s252 + s253 + s254 + s255 + s256 + s257 + s258 + s259 + |
|
176 |
s260 + s261 + s262 + s263 + s264 + s265 + s266 + s267 + s268 + s269 + |
|
177 |
s270 + s271 + s272 + s273 + s274 + s275 + s276 + s277 + s278 + s279 + |
|
178 |
s280 + s281 + s282 + s283 + s284 + s285 + s286 + s287 + s288 + s289 + |
|
179 |
s290 + s291 + s292 + s293 + s294 + s295 + s296 + s297 + s298 + s299; |
|
180 |
||
181 |
StringBuilder sb = new StringBuilder(); |
|
182 |
for (int c = 0; c < 300; c++) { |
|
183 |
sb.append(c); |
|
184 |
} |
|
185 |
test(sb.toString(), res); |
|
186 |
} |
|
187 |
||
188 |
public static void test(String expected, String actual) { |
|
189 |
// Fingers crossed: String concat should work. |
|
190 |
if (!expected.equals(actual)) { |
|
191 |
throw new IllegalStateException("Expected = " + expected + ", actual = " + actual); |
|
192 |
} |
|
193 |
} |
|
194 |
} |
|
195 |