Skip to content

Commit e7d283c

Browse files
committed
a reformat code
1 parent cccec83 commit e7d283c

File tree

2 files changed

+12
-26
lines changed

2 files changed

+12
-26
lines changed

approvaltests-util/src/main/java/com/spun/util/StringUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,8 @@ public static String toString(Map<?, ?> map)
560560
{
561561
StringBuffer b = new StringBuffer();
562562
Object[] keySet = map.keySet().toArray();
563-
if (!(map instanceof SortedMap)) {
563+
if (!(map instanceof SortedMap))
564+
{
564565
Arrays.sort(keySet);
565566
}
566567
for (Object key : keySet)

approvaltests/src/main/java/org/approvaltests/reporters/ImageWebReporter.java

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,20 @@ public class ImageWebReporter implements EnvironmentAwareReporter
1111
public void report(String received, String approved)
1212
{
1313
//language=HTML
14-
String text = "<html>\n" +
15-
"<script>\n" +
16-
" function copyToClipboard() {\n" +
17-
" const copyText = document.getElementById(\"moveText\");\n" +
18-
" navigator.clipboard.writeText(copyText.textContent);\n" +
19-
" }\n" +
20-
"</script>\n" +
21-
"<body>\n" +
22-
"<center>\n" +
23-
" <table border=1>\n" +
24-
" <tr>\n" +
25-
" <td><img src=\"file:///%s\"></td>\n" +
26-
" <td><img src=\"file:///%s\"></td>\n" +
27-
" </tr>\n" +
28-
" <tr>\n" +
29-
" <td>approved</td>\n" +
30-
" <td>received</td>\n" +
31-
" </tr>\n" +
32-
" </table>\n" +
33-
" %s <br/> <b>to approve :</b> copy clipboard to command window <br/> <font size=1 id=\"moveText\">%s</font>\n" +
34-
" <br /><button onclick=\"copyToClipboard()\">Copy to clipboard</button>\n" +
35-
"</center>\n" +
36-
"</body>\n" +
37-
"</html>\n";
14+
String text = "<html>\n" + "<script>\n" + " function copyToClipboard() {\n"
15+
+ " const copyText = document.getElementById(\"moveText\");\n"
16+
+ " navigator.clipboard.writeText(copyText.textContent);\n" + " }\n" + "</script>\n" + "<body>\n"
17+
+ "<center>\n" + " <table border=1>\n" + " <tr>\n"
18+
+ " <td><img src=\"file:///%s\"></td>\n" + " <td><img src=\"file:///%s\"></td>\n"
19+
+ " </tr>\n" + " <tr>\n" + " <td>approved</td>\n"
20+
+ " <td>received</td>\n" + " </tr>\n" + " </table>\n"
21+
+ " %s <br/> <b>to approve :</b> copy clipboard to command window <br/> <font size=1 id=\"moveText\">%s</font>\n"
22+
+ " <br /><button onclick=\"copyToClipboard()\">Copy to clipboard</button>\n" + "</center>\n"
23+
+ "</body>\n" + "</html>\n";
3824
String moveText = ClipboardReporter.getAcceptApprovalText(received, approved);
3925
text = String.format(text, approved, received, received, moveText);
4026
TestUtils.displayHtml(text);
4127
}
42-
4328
/**
4429
* We assume any environment that is not headless will have a web browser to display the image in a web page.
4530
*/

0 commit comments

Comments
 (0)