Coverage(WIP) - Deletes the html coverage report and addns specs coverage

This commit is contained in:
Dandaedre 2023-03-06 03:13:53 +01:00
parent 283d00d31a
commit a54c09bc66
24 changed files with 108 additions and 25211 deletions

1
.gitignore vendored
View File

@ -8,6 +8,7 @@ releases/*
.whl
pyinstaller_log.txt
llvm/*
/coverage/*
# Byte-compiled / optimized / DLL files
__pycache__/

2
Cargo.lock generated
View File

@ -590,7 +590,7 @@ checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
[[package]]
name = "xiv_csolver"
version = "0.2.0"
version = "0.1.6"
dependencies = [
"clap",
"lazy_static",

View File

@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="20" role="img" aria-label="coverage: 10%">
<title>coverage: 10%</title>
xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="20" role="img" aria-label="coverage: 22%">
<title>coverage: 22%</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
@ -16,8 +16,8 @@
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
<text aria-hidden="true" x="315" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="510">coverage</text>
<text x="315" y="140" transform="scale(.1)" fill="#fff" textLength="510">coverage</text>
<text aria-hidden="true" x="775" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="250">10%</text>
<text x="775" y="140" transform="scale(.1)" fill="#fff" textLength="250">10%</text>
<text aria-hidden="true" x="775" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="250">22%</text>
<text x="775" y="140" transform="scale(.1)" fill="#fff" textLength="250">22%</text>
</g>
<script xmlns=""/>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,13 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="20" role="img" aria-label="coverage: 10%">
<title>coverage: 10%</title>
xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="20" role="img" aria-label="coverage: 22%">
<title>coverage: 22%</title>
<g shape-rendering="crispEdges">
<rect width="61" height="20" fill="#555"/>
<rect x="61" width="35" height="20" fill="#e05d44"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
<text x="315" y="140" transform="scale(.1)" fill="#fff" textLength="510">coverage</text>
<text x="775" y="140" transform="scale(.1)" fill="#fff" textLength="250">10%</text>
<text x="775" y="140" transform="scale(.1)" fill="#fff" textLength="250">22%</text>
</g>
<script xmlns=""/>
</svg>

Before

Width:  |  Height:  |  Size: 712 B

After

Width:  |  Height:  |  Size: 712 B

View File

@ -1,13 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="142.5" height="28" role="img" aria-label="COVERAGE: 10%">
<title>COVERAGE: 10%</title>
xmlns:xlink="http://www.w3.org/1999/xlink" width="142.5" height="28" role="img" aria-label="COVERAGE: 22%">
<title>COVERAGE: 22%</title>
<g shape-rendering="crispEdges">
<rect width="91" height="28" fill="#555"/>
<rect x="91" width="51.5" height="28" fill="#e05d44"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="100">
<text fill="#fff" x="455" y="175" transform="scale(.1)" textLength="670">COVERAGE</text>
<text fill="#fff" x="1167.5" y="175" font-weight="bold" transform="scale(.1)" textLength="275">10%</text>
<text fill="#fff" x="1167.5" y="175" font-weight="bold" transform="scale(.1)" textLength="275">22%</text>
</g>
<script xmlns=""/>
</svg>

Before

Width:  |  Height:  |  Size: 739 B

After

Width:  |  Height:  |  Size: 739 B

View File

@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="18" role="img" aria-label="coverage: 10%">
<title>coverage: 10%</title>
xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="18" role="img" aria-label="coverage: 22%">
<title>coverage: 22%</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#fff" stop-opacity=".7"/>
<stop offset=".1" stop-color="#aaa" stop-opacity=".1"/>
@ -18,8 +18,8 @@
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
<text aria-hidden="true" x="315" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="510">coverage</text>
<text x="315" y="130" transform="scale(.1)" fill="#fff" textLength="510">coverage</text>
<text aria-hidden="true" x="775" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="250">10%</text>
<text x="775" y="130" transform="scale(.1)" fill="#fff" textLength="250">10%</text>
<text aria-hidden="true" x="775" y="140" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="250">22%</text>
<text x="775" y="130" transform="scale(.1)" fill="#fff" textLength="250">22%</text>
</g>
<script xmlns=""/>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="99" height="20" role="img" aria-label="Coverage: 10%">
<title>Coverage: 10%</title>
xmlns:xlink="http://www.w3.org/1999/xlink" width="99" height="20" role="img" aria-label="Coverage: 22%">
<title>Coverage: 22%</title>
<style>a:hover #llink{fill:url(#b);stroke:#ccc}a:hover #rlink{fill:#4183c4}</style>
<linearGradient id="a" x2="0" y2="100%">
<stop offset="0" stop-color="#fcfcfc" stop-opacity="0"/>
@ -20,8 +20,8 @@
<rect id="llink" stroke="#d5d5d5" fill="url(#a)" x=".5" y=".5" width="61" height="19" rx="2"/>
<text aria-hidden="true" x="305" y="150" fill="#fff" transform="scale(.1)" textLength="510">Coverage</text>
<text x="305" y="140" transform="scale(.1)" textLength="510">Coverage</text>
<text aria-hidden="true" x="825" y="150" fill="#fff" transform="scale(.1)" textLength="230">10%</text>
<text id="rlink" x="825" y="140" transform="scale(.1)" textLength="230">10%</text>
<text aria-hidden="true" x="825" y="150" fill="#fff" transform="scale(.1)" textLength="230">22%</text>
<text id="rlink" x="825" y="140" transform="scale(.1)" textLength="230">22%</text>
</g>
<script xmlns=""/>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1 +0,0 @@
{"schemaVersion":1,"label":"coverage","message":"10%","color":"red"}

View File

@ -1,129 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Grcov report - top_level </title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css"></head>
<body>
<div class="container">
<nav class="breadcrumb is-right" aria-label="breadcrumbs">
<ul><li class="is-active"><a href="#">top_level</a></li>
</ul>
</nav>
<nav class="level">
<div class="level-item has-text-centered">
<div>
<p class="heading">Lines</p>
<p class="title has-text-danger">
<abbr title="118 / 1124">10.5 %</abbr></p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Functions</p>
<p class="title has-text-danger">
<abbr title="32 / 347">9.22 %</abbr></p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Branches</p>
<p class="title has-text-success">
<abbr title="0 / 0">100 %</abbr></p>
</div>
</div>
</nav>
<table class="table is-fullwidth">
<thead>
<tr>
<th>Directory</th>
<th class="has-text-centered" colspan="3">Line Coverage</th>
<th class="has-text-centered" colspan="2">Functions</th>
<th class="has-text-centered" colspan="2">Branches</th>
</tr>
</thead>
<tbody><tr>
<th><a href="src&#x2F;index.html">src</a></th>
<!-- -->
<td class="p-2">
<progress
class="progress is-danger is-large"
value="10.838831291234683"
max="100">
10.84%
</progress>
</td>
<td class="has-text-centered has-background-danger p-2">
10.84%
</td>
<td class="has-text-centered has-background-danger p-2">
115 / 1061
</td>
<!-- -->
<td class="has-text-centered has-background-danger p-2">8.53%</td>
<td class="has-text-centered has-background-danger p-2">29 / 340 </td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">0 / 0</td>
</tr>
<tr>
<th><a href="src&#x2F;bin&#x2F;index.html">src&#x2F;bin</a></th>
<!-- -->
<td class="p-2">
<progress
class="progress is-danger is-large"
value="1.639344262295082"
max="100">
1.64%
</progress>
</td>
<td class="has-text-centered has-background-danger p-2">
1.64%
</td>
<td class="has-text-centered has-background-danger p-2">
1 / 61
</td>
<!-- -->
<td class="has-text-centered has-background-danger p-2">20%</td>
<td class="has-text-centered has-background-danger p-2">1 / 5 </td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">0 / 0</td>
</tr>
<tr>
<th><a href="tests&#x2F;index.html">tests</a></th>
<!-- -->
<td class="p-2">
<progress
class="progress is-success is-large"
value="100"
max="100">
100%
</progress>
</td>
<td class="has-text-centered has-background-success p-2">
100%
</td>
<td class="has-text-centered has-background-success p-2">
2 / 2
</td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">2 / 2 </td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">0 / 0</td>
</tr>
</tbody>
</table></div>
<footer class="footer">
<div class="content has-text-centered">
<p class="heading">Date: 2023-03-01 23:03</p>
</div>
</footer>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -1,81 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Grcov report - src&#x2F;bin </title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css"></head>
<body>
<div class="container">
<nav class="breadcrumb is-right" aria-label="breadcrumbs">
<ul><li><a href="../index.html">top_level</a></li><li class="is-active"><a href="#">src&#x2F;bin</a></li>
</ul>
</nav>
<nav class="level">
<div class="level-item has-text-centered">
<div>
<p class="heading">Lines</p>
<p class="title has-text-danger">
<abbr title="1 / 61">1.64 %</abbr></p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Functions</p>
<p class="title has-text-danger">
<abbr title="1 / 5">20 %</abbr></p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Branches</p>
<p class="title has-text-success">
<abbr title="0 / 0">100 %</abbr></p>
</div>
</div>
</nav>
<table class="table is-fullwidth">
<thead>
<tr>
<th>File</th>
<th class="has-text-centered" colspan="3">Line Coverage</th>
<th class="has-text-centered" colspan="2">Functions</th>
<th class="has-text-centered" colspan="2">Branches</th>
</tr>
</thead>
<tbody><tr>
<th><a href="xiv_csolver.rs.html">xiv_csolver.rs</a></th>
<!-- -->
<td class="p-2">
<progress
class="progress is-danger is-large"
value="1.639344262295082"
max="100">
1.64%
</progress>
</td>
<td class="has-text-centered has-background-danger p-2">
1.64%
</td>
<td class="has-text-centered has-background-danger p-2">
1 / 61
</td>
<!-- -->
<td class="has-text-centered has-background-danger p-2">20%</td>
<td class="has-text-centered has-background-danger p-2">1 / 5 </td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">0 / 0</td>
</tr>
</tbody>
</table></div>
<footer class="footer">
<div class="content has-text-centered">
<p class="heading">Date: 2023-03-01 23:03</p>
</div>
</footer>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,201 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Grcov report - src </title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css"></head>
<body>
<div class="container">
<nav class="breadcrumb is-right" aria-label="breadcrumbs">
<ul><li><a href="../index.html">top_level</a></li><li class="is-active"><a href="#">src</a></li>
</ul>
</nav>
<nav class="level">
<div class="level-item has-text-centered">
<div>
<p class="heading">Lines</p>
<p class="title has-text-danger">
<abbr title="115 / 1061">10.84 %</abbr></p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Functions</p>
<p class="title has-text-danger">
<abbr title="29 / 340">8.53 %</abbr></p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Branches</p>
<p class="title has-text-success">
<abbr title="0 / 0">100 %</abbr></p>
</div>
</div>
</nav>
<table class="table is-fullwidth">
<thead>
<tr>
<th>File</th>
<th class="has-text-centered" colspan="3">Line Coverage</th>
<th class="has-text-centered" colspan="2">Functions</th>
<th class="has-text-centered" colspan="2">Branches</th>
</tr>
</thead>
<tbody><tr>
<th><a href="action.rs.html">action.rs</a></th>
<!-- -->
<td class="p-2">
<progress
class="progress is-danger is-large"
value="0"
max="100">
0%
</progress>
</td>
<td class="has-text-centered has-background-danger p-2">
0%
</td>
<td class="has-text-centered has-background-danger p-2">
0 / 239
</td>
<!-- -->
<td class="has-text-centered has-background-danger p-2">0%</td>
<td class="has-text-centered has-background-danger p-2">0 / 36 </td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">0 / 0</td>
</tr>
<tr>
<th><a href="craft.rs.html">craft.rs</a></th>
<!-- -->
<td class="p-2">
<progress
class="progress is-danger is-large"
value="0"
max="100">
0%
</progress>
</td>
<td class="has-text-centered has-background-danger p-2">
0%
</td>
<td class="has-text-centered has-background-danger p-2">
0 / 102
</td>
<!-- -->
<td class="has-text-centered has-background-danger p-2">0%</td>
<td class="has-text-centered has-background-danger p-2">0 / 14 </td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">0 / 0</td>
</tr>
<tr>
<th><a href="io.rs.html">io.rs</a></th>
<!-- -->
<td class="p-2">
<progress
class="progress is-danger is-large"
value="53.77358490566038"
max="100">
53.77%
</progress>
</td>
<td class="has-text-centered has-background-danger p-2">
53.77%
</td>
<td class="has-text-centered has-background-danger p-2">
114 / 212
</td>
<!-- -->
<td class="has-text-centered has-background-danger p-2">13.4%</td>
<td class="has-text-centered has-background-danger p-2">28 / 209 </td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">0 / 0</td>
</tr>
<tr>
<th><a href="lib.rs.html">lib.rs</a></th>
<!-- -->
<td class="p-2">
<progress
class="progress is-danger is-large"
value="0.43478260869565216"
max="100">
0.43%
</progress>
</td>
<td class="has-text-centered has-background-danger p-2">
0.43%
</td>
<td class="has-text-centered has-background-danger p-2">
1 / 230
</td>
<!-- -->
<td class="has-text-centered has-background-danger p-2">4.76%</td>
<td class="has-text-centered has-background-danger p-2">1 / 21 </td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">0 / 0</td>
</tr>
<tr>
<th><a href="solver.rs.html">solver.rs</a></th>
<!-- -->
<td class="p-2">
<progress
class="progress is-danger is-large"
value="0"
max="100">
0%
</progress>
</td>
<td class="has-text-centered has-background-danger p-2">
0%
</td>
<td class="has-text-centered has-background-danger p-2">
0 / 203
</td>
<!-- -->
<td class="has-text-centered has-background-danger p-2">0%</td>
<td class="has-text-centered has-background-danger p-2">0 / 12 </td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">0 / 0</td>
</tr>
<tr>
<th><a href="specs.rs.html">specs.rs</a></th>
<!-- -->
<td class="p-2">
<progress
class="progress is-danger is-large"
value="0"
max="100">
0%
</progress>
</td>
<td class="has-text-centered has-background-danger p-2">
0%
</td>
<td class="has-text-centered has-background-danger p-2">
0 / 75
</td>
<!-- -->
<td class="has-text-centered has-background-danger p-2">0%</td>
<td class="has-text-centered has-background-danger p-2">0 / 48 </td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">0 / 0</td>
</tr>
</tbody>
</table></div>
<footer class="footer">
<div class="content has-text-centered">
<p class="heading">Date: 2023-03-01 23:03</p>
</div>
</footer>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,105 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Grcov report - tests </title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css"></head>
<body>
<div class="container">
<nav class="breadcrumb is-right" aria-label="breadcrumbs">
<ul><li><a href="../index.html">top_level</a></li><li class="is-active"><a href="#">tests</a></li>
</ul>
</nav>
<nav class="level">
<div class="level-item has-text-centered">
<div>
<p class="heading">Lines</p>
<p class="title has-text-success">
<abbr title="2 / 2">100 %</abbr></p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Functions</p>
<p class="title has-text-success">
<abbr title="2 / 2">100 %</abbr></p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Branches</p>
<p class="title has-text-success">
<abbr title="0 / 0">100 %</abbr></p>
</div>
</div>
</nav>
<table class="table is-fullwidth">
<thead>
<tr>
<th>File</th>
<th class="has-text-centered" colspan="3">Line Coverage</th>
<th class="has-text-centered" colspan="2">Functions</th>
<th class="has-text-centered" colspan="2">Branches</th>
</tr>
</thead>
<tbody><tr>
<th><a href="io.rs.html">io.rs</a></th>
<!-- -->
<td class="p-2">
<progress
class="progress is-success is-large"
value="100"
max="100">
100%
</progress>
</td>
<td class="has-text-centered has-background-success p-2">
100%
</td>
<td class="has-text-centered has-background-success p-2">
1 / 1
</td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">1 / 1 </td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">0 / 0</td>
</tr>
<tr>
<th><a href="lib.rs.html">lib.rs</a></th>
<!-- -->
<td class="p-2">
<progress
class="progress is-success is-large"
value="100"
max="100">
100%
</progress>
</td>
<td class="has-text-centered has-background-success p-2">
100%
</td>
<td class="has-text-centered has-background-success p-2">
1 / 1
</td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">1 / 1 </td>
<!-- -->
<td class="has-text-centered has-background-success p-2">100%</td>
<td class="has-text-centered has-background-success p-2">0 / 0</td>
</tr>
</tbody>
</table></div>
<footer class="footer">
<div class="content has-text-centered">
<p class="heading">Date: 2023-03-01 23:03</p>
</div>
</footer>
</body>
</html>

View File

@ -1,64 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Grcov report - io.rs </title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css"></head>
<body>
<div class="container">
<nav class="breadcrumb is-right" aria-label="breadcrumbs">
<ul><li><a href="../index.html">top_level</a></li><li><a href="./index.html">tests</a></li><li class="is-active"><a href="#">io.rs</a></li>
</ul>
</nav>
<nav class="level">
<div class="level-item has-text-centered">
<div>
<p class="heading">Lines</p>
<p class="title has-text-success">
<abbr title="1 / 1">100 %</abbr></p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Functions</p>
<p class="title has-text-success">
<abbr title="1 / 1">100 %</abbr></p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Branches</p>
<p class="title has-text-success">
<abbr title="0 / 0">100 %</abbr></p>
</div>
</div>
</nav>
<div role="table" aria-label="Coverage report"><div class="columns p-0 m-0" role="row">
<div
class="column is-1 is-narrow p-0 has-text-centered"
id="1"
role="cell">
<a href="#1">1</a>
</div>
<div
class="column is-1 is-narrow p-0 has-text-centered has-text-success-light has-background-success"
role="cell" aria-label="11">
11
</div>
<div class="column has-background-success-light p-0"
role="cell">
<pre class="has-background-success-light py-0 px-2"></pre>
</div>
</div></div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p class="heading">Date: 2023-03-01 23:03</p>
</div>
</footer>
</body>
</html>

View File

@ -1,64 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Grcov report - lib.rs </title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css"></head>
<body>
<div class="container">
<nav class="breadcrumb is-right" aria-label="breadcrumbs">
<ul><li><a href="../index.html">top_level</a></li><li><a href="./index.html">tests</a></li><li class="is-active"><a href="#">lib.rs</a></li>
</ul>
</nav>
<nav class="level">
<div class="level-item has-text-centered">
<div>
<p class="heading">Lines</p>
<p class="title has-text-success">
<abbr title="1 / 1">100 %</abbr></p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Functions</p>
<p class="title has-text-success">
<abbr title="1 / 1">100 %</abbr></p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Branches</p>
<p class="title has-text-success">
<abbr title="0 / 0">100 %</abbr></p>
</div>
</div>
</nav>
<div role="table" aria-label="Coverage report"><div class="columns p-0 m-0" role="row">
<div
class="column is-1 is-narrow p-0 has-text-centered"
id="1"
role="cell">
<a href="#1">1</a>
</div>
<div
class="column is-1 is-narrow p-0 has-text-centered has-text-success-light has-background-success"
role="cell" aria-label="11">
11
</div>
<div class="column has-background-success-light p-0"
role="cell">
<pre class="has-background-success-light py-0 px-2"></pre>
</div>
</div></div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p class="heading">Date: 2023-03-01 23:03</p>
</div>
</footer>
</body>
</html>

View File

@ -183,3 +183,15 @@ impl<'a> Display for Craft<'a> {
.finish()
}
}
#[cfg(test)]
mod test{
// Struct Test
#[test]
pub fn struct_tests(){
}
}

View File

@ -307,7 +307,7 @@ pub fn solve_from_python(py: Python<'_>, values: &PyAny) -> PyResult<Option<Vec<
py.allow_threads(move || {
let res = solve_craft(recipe, stats, param);
Ok(res)
})
})
}
#[cfg(test)]

View File

@ -151,7 +151,7 @@ impl BuffState {
Buff::MuscleMemory => self.muscle_memory = value,
Buff::BasicTouch => self.basic_touch = value,
Buff::StandardTouch => self.standard_touch = value,
Buff::Observe => self.standard_touch = value,
Buff::Observe => self.observe = value,
}
}
@ -186,7 +186,7 @@ impl BuffState {
/// State the craft is in, used to keep track of wether the craft
/// is to be worked on, added to the success vector or discarded
#[derive(Debug, Clone, Copy, PartialEq)]
#[derive(Debug,Clone,PartialEq)]
pub enum Success {
/// Pending success and therefor still ongoing
Pending,
@ -195,3 +195,76 @@ pub enum Success {
/// Finised because of lack of remaining durability
Failure,
}
// Test unit
#[cfg(test)]
mod tests {
// Test default values
use pretty_assertions::{assert_eq};
use strum::IntoEnumIterator;
#[test]
pub fn test_structs() {
format!("{:?}",crate::specs::Recipe {
durability: 0,
progress: 0,
progress_divider: 0,
progress_modifier: 0,
quality: 0,
quality_divider: 0,
quality_modifier: 0,
}.clone());
format!("{:?}",crate::specs::Stats {
craftsmanship: 0,
control: 0,
max_cp: 0,
}
.clone());
let iq = crate::specs::Buff::InnerQuiet;
assert_eq!(crate::specs::Buff::InnerQuiet, iq);
for buff in crate::specs::Buff::iter(){
format!("{:?}",buff);
}
format!("{:?}", crate::specs::BuffState::default().clone());
let sc = crate::specs::Success::Pending;
assert!(crate::specs::Success::Pending==sc);
assert!(crate::specs::Success::Success!=sc);
format!("{:?}",sc);
}
#[test]
pub fn test_buffstate() {
let mut bbs = crate::specs::BuffState::default();
for buff in crate::specs::Buff::iter(){
bbs.apply(buff, 2);
}
assert_eq!(bbs.inner_quiet, 2);
assert_eq!(bbs.waste_not, 2);
assert_eq!(bbs.great_strides, 2);
assert_eq!(bbs.innovation, 2);
assert_eq!(bbs.veneration, 2);
assert_eq!(bbs.manipulation, 2);
assert_eq!(bbs.muscle_memory, 2);
assert_eq!(bbs.basic_touch, 2);
assert_eq!(bbs.standard_touch, 2);
assert_eq!(bbs.observe, 2);
bbs.apply(crate::specs::Buff::InnerQuiet, 0);
bbs.apply(crate::specs::Buff::Innovation, 5);
assert_eq!(bbs.inner_quiet, 0);
assert_eq!(bbs.innovation, 5);
bbs.apply(crate::specs::Buff::InnerQuiet, 2);
bbs.apply(crate::specs::Buff::InnerQuiet, 1);
assert_eq!(bbs.inner_quiet, 3);
bbs.tick();
assert_eq!(bbs.inner_quiet, 3);
assert_eq!(bbs.innovation, 4);
for buff in crate::specs::Buff::iter(){
bbs.remove(buff);
}
assert_eq!(bbs.inner_quiet, 0);
assert_eq!(bbs.innovation, 0);
}
}