Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JUnit5 #52

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,278 changes: 1,278 additions & 0 deletions generated_results/Test Results - All_in_delight-nashorn-sandbox.html

Large diffs are not rendered by default.

142 changes: 142 additions & 0 deletions generated_results/code_coverage/.css/coverage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
* {
margin: 0;
padding: 0;
}

body {
font-size: 90%;
background-color: #fff;
font-family: tahoma, verdana, arial, sans-serif;
color: #3f3f3f;
}

div.content {
padding: 0.2em 0.3em 0.2em 0.4em;
width: 99%;
}

h1 {
font:normal 18px tahoma, sans-serif;
margin: 0.5em 0 0.5em 0;
color: #010101;
}

h2 {
margin: 0.5em 0 0.5em 0;
font:bold 14px tahoma, sans-serif;
color: #010101;
}

table.coverageStats {
width: 99%;
border-collapse: collapse;
}

table.overallStats {
width: 20%;
}

table.coverageStats th {
font-weight: bold;
text-align: left;
}

table.coverageStats th.coverageStat {
width: 20%;
}

table.coverageStats th.sortedDesc a {
background: #fff url(../.img/arrowDown.gif) no-repeat 100% 0;
padding-right: 20px;
}

table.coverageStats th.sortedAsc a {
background: #fff url(../.img/arrowUp.gif) no-repeat 100% 0;
padding-right: 20px;
}

table.coverageStats td, table.coverageStats th {
border: 1px solid #ccc;
padding: 2px;
}

a {
color: #0254D0;
text-decoration: none;
}

a:hover {
text-decoration: underline;
color: #0254D0;
}

div.footer {
margin: 2em 2em 2em 0.5em;
font-size: 85%;
text-align: left;
line-height: 140%;
}

div.header {
padding: 0.5em;
background-color: #E3E9EF;
color: #3773C9;
font-weight: bold;
font-size: 120%;
text-align: center;
}

div.sourceCode {
width: 99%;
white-space: pre;
border: 1px solid #ccc;
font-family: monospace;
padding: 0;
}

i {
background-color: #eee;
}

div.sourceCode b {
font-weight: normal;
}

div.sourceCode i {
font-style: normal;
width: 3em;
padding: 0 3px 0 0;
display: block;
float: left;
text-align: right;
border-right: 1px solid #ccc;
/*margin-right: 3px;*/
}

div.sourceCode .fc, div.sourceCode .fc i {
background-color: #ccffcc;
}

div.sourceCode .pc, div.sourceCode .pc i {
background-color: #ffffcc;
}

div.sourceCode .nc, div.sourceCode .nc i {
background-color: #ffcccc;
}

.percent, .absValue {
font-size: 90%;
}

.percent .green, .absValue .green {
color: limegreen;
}

.percent .red, .absValue .red {
color: red;
}

.percent .totalDiff {
color: #3f3f3f;
}
Binary file added generated_results/code_coverage/.img/arrowDown.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added generated_results/code_coverage/.img/arrowUp.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="htmlId">
<head>
<title>Coverage Report :: BracesException</title>
<style type="text/css">
@import "../../.css/coverage.css";
</style>
</head>

<body>
<div class="header"></div>

<div class="content">
<div class="breadCrumbs">
[ <a href="../../index.html">all classes</a> ]
[ <a href="../index.html">delight.nashornsandbox.exceptions</a> ]
</div>

<h1>Coverage Summary for Class: BracesException (delight.nashornsandbox.exceptions)</h1>

<table class="coverageStats">
<tr>
<th class="name">Class</th>
<th class="coverageStat
">
Class, %
</th>
<th class="coverageStat
">
Method, %
</th>
<th class="coverageStat
">
Line, %
</th>
</tr>
<tr>
<td class="name">BracesException</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(1/ 1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(1/ 1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(2/ 2)
</span>
</td>
</tr>

</table>

<br/>
<br/>


<div class="sourceCode"><i>1</i>&nbsp;package delight.nashornsandbox.exceptions;
<i>2</i>&nbsp;
<i>3</i>&nbsp;import javax.script.ScriptException;
<i>4</i>&nbsp;
<i>5</i>&nbsp;/**
<i>6</i>&nbsp; * Exception thrown when braces &quot;{}&quot; are missed in JS script, when it is not
<i>7</i>&nbsp; * allowed.
<i>8</i>&nbsp; *
<i>9</i>&nbsp; * &lt;p&gt;Created on 2017.11.24&lt;/p&gt;
<i>10</i>&nbsp; *
<i>11</i>&nbsp; * @author &lt;a href=&quot;mailto:[email protected]&quot;&gt;Marcin Golebski&lt;/a&gt;
<i>12</i>&nbsp; * @version $Id$
<i>13</i>&nbsp; */
<i>14</i>&nbsp;public class BracesException extends ScriptException {
<i>15</i>&nbsp; private static final long serialVersionUID = 1L;
<i>16</i>&nbsp;
<i>17</i>&nbsp; public BracesException(final String s) {
<b class="fc"><i>18</i>&nbsp; super(s);</b>
<b class="fc"><i>19</i>&nbsp; }</b>
<i>20</i>&nbsp;
<i>21</i>&nbsp;}
</div>
</div>

<div class="footer">

<div style="float:right;">generated on 2018-03-23 17:11</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="htmlId">
<head>
<title>Coverage Report :: ScriptAbuseException</title>
<style type="text/css">
@import "../../.css/coverage.css";
</style>
</head>

<body>
<div class="header"></div>

<div class="content">
<div class="breadCrumbs">
[ <a href="../../index.html">all classes</a> ]
[ <a href="../index.html">delight.nashornsandbox.exceptions</a> ]
</div>

<h1>Coverage Summary for Class: ScriptAbuseException (delight.nashornsandbox.exceptions)</h1>

<table class="coverageStats">
<tr>
<th class="name">Class</th>
<th class="coverageStat
">
Class, %
</th>
<th class="coverageStat
">
Method, %
</th>
<th class="coverageStat
">
Line, %
</th>
</tr>
<tr>
<td class="name">ScriptAbuseException</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(1/ 1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(3/ 3)
</span>
</td>
<td class="coverageStat">
<span class="percent">
85,7%
</span>
<span class="absValue">
(6/ 7)
</span>
</td>
</tr>

</table>

<br/>
<br/>


<div class="sourceCode"><i>1</i>&nbsp;package delight.nashornsandbox.exceptions;
<i>2</i>&nbsp;
<i>3</i>&nbsp;/**
<i>4</i>&nbsp; * Exception is thrown when JS script abuse was detected.
<i>5</i>&nbsp; *
<i>6</i>&nbsp; * &lt;p&gt;Created on 2017.11.24&lt;/p&gt;
<i>7</i>&nbsp; *
<i>8</i>&nbsp; * @author &lt;a href=&quot;mailto:[email protected]&quot;&gt;Marcin Golebski&lt;/a&gt;
<i>9</i>&nbsp; * @version $Id$
<i>10</i>&nbsp; */
<i>11</i>&nbsp;public class ScriptAbuseException extends RuntimeException {
<i>12</i>&nbsp; private static final long serialVersionUID = 1L;
<i>13</i>&nbsp; private final boolean scriptKilled;
<i>14</i>&nbsp;
<i>15</i>&nbsp; public ScriptAbuseException(final String message, final boolean scriptKilled,
<i>16</i>&nbsp; final Throwable throwable) {
<b class="fc"><i>17</i>&nbsp; super(message, throwable);</b>
<b class="fc"><i>18</i>&nbsp; this.scriptKilled = scriptKilled;</b>
<b class="fc"><i>19</i>&nbsp; }</b>
<i>20</i>&nbsp;
<i>21</i>&nbsp; /**
<i>22</i>&nbsp; * Check if script when asked exited nicely, or not.
<i>23</i>&nbsp; * &lt;p&gt;
<i>24</i>&nbsp; * Note, killint java thread is very dangerous to VM health.
<i>25</i>&nbsp; * &lt;/p&gt;
<i>26</i>&nbsp; *
<i>27</i>&nbsp; * @return &lt;code&gt;true&lt;/code&gt; when evaluator thread was finished by
<i>28</i>&nbsp; * {@link Thread#stop()} method, &lt;code&gt;false&lt;/code&gt; when only
<i>29</i>&nbsp; * {@link Thread#interrupt()} was used
<i>30</i>&nbsp; */
<i>31</i>&nbsp; public boolean isScriptKilled() {
<b class="fc"><i>32</i>&nbsp; return scriptKilled;</b>
<i>33</i>&nbsp; }
<i>34</i>&nbsp;
<i>35</i>&nbsp; @Override
<i>36</i>&nbsp; public String getMessage() {
<b class="fc"><i>37</i>&nbsp; if(scriptKilled) {</b>
<b class="nc"><i>38</i>&nbsp; return super.getMessage() + &quot; The operation could NOT be gracefully interrupted.&quot;;</b>
<i>39</i>&nbsp; }
<i>40</i>&nbsp; else {
<b class="fc"><i>41</i>&nbsp; return super.getMessage();</b>
<i>42</i>&nbsp; }
<i>43</i>&nbsp; }
<i>44</i>&nbsp;
<i>45</i>&nbsp;}
</div>
</div>

<div class="footer">

<div style="float:right;">generated on 2018-03-23 17:11</div>
</div>
</body>
</html>
Loading