Skip to content

Commit

Permalink
Automated test coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
d-markey committed Nov 2, 2024
1 parent 7520cf3 commit 05052a0
Show file tree
Hide file tree
Showing 11 changed files with 335 additions and 39 deletions.
2 changes: 1 addition & 1 deletion coverage.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"linesValid":2377,"lineRate":87.4}
{"linesValid":2392,"lineRate":87.5}
6 changes: 3 additions & 3 deletions doc/coverage/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h1>LCOV - code coverage report</h1>
</thead>
<tbody>
<tr>
<th scope="row">Lines</th><td>2078</td><td>2377</td><td class="med">87.4%</td>
<th scope="row">Lines</th><td>2092</td><td>2392</td><td class="med">87.5%</td>
</tr>
<tr>
<th scope="row">Functions</th><td>0</td><td>0</td><td class="high">-</td>
Expand All @@ -61,8 +61,8 @@ <h1>LCOV - code coverage report</h1>
<tbody>
<tr>
<td headers="directory"><a href="src/index.html" title="/home/runner/work/squadron/squadron/lib/src">src</a></td><td headers="line-indicator lineCoverage">
<meter high="90" low="75" max="100" min="0" optimum="100" value="77.8">77.8%</meter>
</td><td headers="line-percent lineCoverage" class="med">77.8%</td><td headers="line-ratio lineCoverage" class="med">28/36</td><td headers="function-percent functions" class="high">-</td><td headers="function-ratio functions" class="high">0/0</td><td headers="branch-percent branches" class="high">-</td><td headers="branch-ratio branches" class="high">0/0</td>
<meter high="90" low="75" max="100" min="0" optimum="100" value="82.4">82.4%</meter>
</td><td headers="line-percent lineCoverage" class="med">82.4%</td><td headers="line-ratio lineCoverage" class="med">42/51</td><td headers="function-percent functions" class="high">-</td><td headers="function-ratio functions" class="high">0/0</td><td headers="branch-percent branches" class="high">-</td><td headers="branch-ratio branches" class="high">0/0</td>
</tr>
<tr>
<td headers="directory"><a href="src/_impl/native/index.html" title="/home/runner/work/squadron/squadron/lib/src/_impl/native">src/_impl/native</a></td><td headers="line-indicator lineCoverage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h1>LCOV - code coverage report</h1>
<td>4</td><td></td><td></td><td><code></code></td>
</tr>
<tr class="lineCov" title="Line 5" id="line5">
<td>5</td><td></td><td>8</td><td><code>Converter getPlatformConverter() =&gt; DirectCastConverter.instance;</code></td>
<td>5</td><td></td><td>9</td><td><code>Converter getPlatformConverter() =&gt; DirectCastConverter.instance;</code></td>
</tr>
<tr class="noop" title="Line 6" id="line6">
<td>6</td><td></td><td></td><td><code></code></td>
Expand Down
2 changes: 1 addition & 1 deletion doc/coverage/html/src/_impl/web/_platform.dart.gcov.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h1>LCOV - code coverage report</h1>
<td>7</td><td></td><td></td><td><code>Converter getPlatformConverter() =&gt; (1.toDouble() is int)</code></td>
</tr>
<tr class="lineCov" title="Line 8" id="line8">
<td>8</td><td></td><td>8</td><td><code> ? CastConverter.instance // JavaScript</code></td>
<td>8</td><td></td><td>9</td><td><code> ? CastConverter.instance // JavaScript</code></td>
</tr>
<tr class="noop" title="Line 9" id="line9">
<td>9</td><td></td><td></td><td><code> : NumConverter.instance; // Web Assembly</code></td>
Expand Down
8 changes: 4 additions & 4 deletions doc/coverage/html/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h1>LCOV - code coverage report</h1>
</thead>
<tbody>
<tr>
<th scope="row">Lines</th><td>28</td><td>36</td><td class="med">77.8%</td>
<th scope="row">Lines</th><td>42</td><td>51</td><td class="med">82.4%</td>
</tr>
<tr>
<th scope="row">Functions</th><td>0</td><td>0</td><td class="high">-</td>
Expand Down Expand Up @@ -95,11 +95,11 @@ <h1>LCOV - code coverage report</h1>
</tr>
<tr>
<td headers="filename"><a href="squadron_singleton.dart.gcov.html" title="/home/runner/work/squadron/squadron/lib//squadron_singleton.dart">squadron_singleton.dart</a></td><td headers="line-indicator lineCoverage">
<meter high="90" low="75" max="100" min="0" optimum="100" value="100.0">100.0%</meter>
</td><td headers="line-percent lineCoverage" class="high">100.0%</td><td headers="line-ratio lineCoverage" class="high">3/3</td><td headers="function-percent functions" class="high">-</td><td headers="function-ratio functions" class="high">0/0</td><td headers="branch-percent branches" class="high">-</td><td headers="branch-ratio branches" class="high">0/0</td>
<meter high="90" low="75" max="100" min="0" optimum="100" value="94.4">94.4%</meter>
</td><td headers="line-percent lineCoverage" class="high">94.4%</td><td headers="line-ratio lineCoverage" class="high">17/18</td><td headers="function-percent functions" class="high">-</td><td headers="function-ratio functions" class="high">0/0</td><td headers="branch-percent branches" class="high">-</td><td headers="branch-ratio branches" class="high">0/0</td>
</tr>
<tr class="bound">
<td></td><td headers="line-indicator lineCoverage">&lt;unnamed&gt;</td><td headers="line-percent lineCoverage">100.0%</td><td headers="line-ratio lineCoverage">3/3</td><td headers="function-percent functions">-</td><td headers="function-ratio functions">0/0</td><td headers="branch-percent branches">-</td><td headers="branch-ratio branches">0/0</td>
<td></td><td headers="line-indicator lineCoverage">&lt;unnamed&gt;</td><td headers="line-percent lineCoverage">94.4%</td><td headers="line-ratio lineCoverage">17/18</td><td headers="function-percent functions">-</td><td headers="function-ratio functions">0/0</td><td headers="branch-percent branches">-</td><td headers="branch-ratio branches">0/0</td>
</tr>
<tr>
<td headers="filename"><a href="typedefs.dart.gcov.html" title="/home/runner/work/squadron/squadron/lib//typedefs.dart">typedefs.dart</a></td><td headers="line-indicator lineCoverage">
Expand Down
163 changes: 152 additions & 11 deletions doc/coverage/html/src/squadron_singleton.dart.gcov.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h1>LCOV - code coverage report</h1>
</thead>
<tbody>
<tr>
<th scope="row">Lines</th><td>3</td><td>3</td><td class="high">100.0%</td>
<th scope="row">Lines</th><td>17</td><td>18</td><td class="high">94.4%</td>
</tr>
<tr>
<th scope="row">Functions</th><td>0</td><td>0</td><td class="high">-</td>
Expand Down Expand Up @@ -73,25 +73,166 @@ <h1>LCOV - code coverage report</h1>
<td>4</td><td></td><td></td><td><code> if (dart.library.js_interop) '_impl/web/_platform.dart' as impl;</code></td>
</tr>
<tr class="noop" title="Line 5" id="line5">
<td>5</td><td></td><td></td><td><code></code></td>
<td>5</td><td></td><td></td><td><code>import 'converters/converter.dart';</code></td>
</tr>
<tr class="noop" title="Line 6" id="line6">
<td>6</td><td></td><td></td><td><code>class Squadron {</code></td>
<td>6</td><td></td><td></td><td><code></code></td>
</tr>
<tr class="lineCov" title="Line 7" id="line7">
<td>7</td><td></td><td>32</td><td><code> static final converter = impl.getPlatformConverter();</code></td>
<tr class="noop" title="Line 7" id="line7">
<td>7</td><td></td><td></td><td><code>class Squadron {</code></td>
</tr>
<tr class="lineCov" title="Line 8" id="line8">
<td>8</td><td></td><td>8</td><td><code> static final platformType = impl.getPlatformType();</code></td>
<tr class="lineNoCov" title="Line 8" id="line8">
<td>8</td><td></td><td>0</td><td><code> Squadron._();</code></td>
</tr>
<tr class="noop" title="Line 9" id="line9">
<td>9</td><td></td><td></td><td><code></code></td>
</tr>
<tr class="lineCov" title="Line 10" id="line10">
<td>10</td><td></td><td>12</td><td><code> static Uri uri(String url) =&gt; impl.mapUrl(url);</code></td>
<tr class="noop" title="Line 10" id="line10">
<td>10</td><td></td><td></td><td><code> /// Gets the current platform type.</code></td>
</tr>
<tr class="noop" title="Line 11" id="line11">
<td>11</td><td></td><td></td><td><code>}</code></td>
<tr class="lineCov" title="Line 11" id="line11">
<td>11</td><td></td><td>8</td><td><code> static final platformType = impl.getPlatformType();</code></td>
</tr>
<tr class="noop" title="Line 12" id="line12">
<td>12</td><td></td><td></td><td><code></code></td>
</tr>
<tr class="noop" title="Line 13" id="line13">
<td>13</td><td></td><td></td><td><code> /// Parse [url] and returns the corresponding [Uri].</code></td>
</tr>
<tr class="noop" title="Line 14" id="line14">
<td>14</td><td></td><td></td><td><code> ///</code></td>
</tr>
<tr class="noop" title="Line 15" id="line15">
<td>15</td><td></td><td></td><td><code> /// On Web platforms, a leading '~' character will be replaced with the</code></td>
</tr>
<tr class="noop" title="Line 16" id="line16">
<td>16</td><td></td><td></td><td><code> /// current page's root URL. E.g. '~/workers' from '/path/to/index.html'</code></td>
</tr>
<tr class="noop" title="Line 17" id="line17">
<td>17</td><td></td><td></td><td><code> /// will return '/path/to/workers'.</code></td>
</tr>
<tr class="lineCov" title="Line 18" id="line18">
<td>18</td><td></td><td>12</td><td><code> static Uri uri(String url) =&gt; impl.mapUrl(url);</code></td>
</tr>
<tr class="noop" title="Line 19" id="line19">
<td>19</td><td></td><td></td><td><code></code></td>
</tr>
<tr class="lineCov" title="Line 20" id="line20">
<td>20</td><td></td><td>36</td><td><code> static final _platformConverter = impl.getPlatformConverter();</code></td>
</tr>
<tr class="lineCov" title="Line 21" id="line21">
<td>21</td><td></td><td>36</td><td><code> static Converter _converter = _platformConverter;</code></td>
</tr>
<tr class="noop" title="Line 22" id="line22">
<td>22</td><td></td><td></td><td><code></code></td>
</tr>
<tr class="noop" title="Line 23" id="line23">
<td>23</td><td></td><td></td><td><code> /// Gets the current converter.</code></td>
</tr>
<tr class="lineCov" title="Line 24" id="line24">
<td>24</td><td></td><td>27</td><td><code> static Converter get converter =&gt; _converter;</code></td>
</tr>
<tr class="noop" title="Line 25" id="line25">
<td>25</td><td></td><td></td><td><code></code></td>
</tr>
<tr class="noop" title="Line 26" id="line26">
<td>26</td><td></td><td></td><td><code> /// Sets the current converter. If [value] is `null`, the default converter</code></td>
</tr>
<tr class="noop" title="Line 27" id="line27">
<td>27</td><td></td><td></td><td><code> /// will be restored. If the converter was updated, handlers registered with</code></td>
</tr>
<tr class="noop" title="Line 28" id="line28">
<td>28</td><td></td><td></td><td><code> /// [onConverterChanged] will be notified of the change.</code></td>
</tr>
<tr class="lineCov" title="Line 29" id="line29">
<td>29</td><td></td><td>2</td><td><code> static set converter(Converter? value) {</code></td>
</tr>
<tr class="lineCov" title="Line 30" id="line30">
<td>30</td><td></td><td>2</td><td><code> value ??= _platformConverter;</code></td>
</tr>
<tr class="lineCov" title="Line 31" id="line31">
<td>31</td><td></td><td>3</td><td><code> if (_converter != value) {</code></td>
</tr>
<tr class="noop" title="Line 32" id="line32">
<td>32</td><td></td><td></td><td><code> _converter = value;</code></td>
</tr>
<tr class="lineCov" title="Line 33" id="line33">
<td>33</td><td></td><td>4</td><td><code> for (var handler in _converterChangeHandlers.values) {</code></td>
</tr>
<tr class="noop" title="Line 34" id="line34">
<td>34</td><td></td><td></td><td><code> try {</code></td>
</tr>
<tr class="lineCov" title="Line 35" id="line35">
<td>35</td><td></td><td>2</td><td><code> handler();</code></td>
</tr>
<tr class="noop" title="Line 36" id="line36">
<td>36</td><td></td><td></td><td><code> } catch (_) {</code></td>
</tr>
<tr class="noop" title="Line 37" id="line37">
<td>37</td><td></td><td></td><td><code> // ignore</code></td>
</tr>
<tr class="noop" title="Line 38" id="line38">
<td>38</td><td></td><td></td><td><code> }</code></td>
</tr>
<tr class="noop" title="Line 39" id="line39">
<td>39</td><td></td><td></td><td><code> }</code></td>
</tr>
<tr class="noop" title="Line 40" id="line40">
<td>40</td><td></td><td></td><td><code> }</code></td>
</tr>
<tr class="lineCov" title="Line 41" id="line41">
<td>41</td><td></td><td>1</td><td><code> }</code></td>
</tr>
<tr class="noop" title="Line 42" id="line42">
<td>42</td><td></td><td></td><td><code></code></td>
</tr>
<tr class="lineCov" title="Line 43" id="line43">
<td>43</td><td></td><td>3</td><td><code> static final _converterChangeHandlers = &lt;Object, void Function()&gt;{};</code></td>
</tr>
<tr class="noop" title="Line 44" id="line44">
<td>44</td><td></td><td></td><td><code></code></td>
</tr>
<tr class="noop" title="Line 45" id="line45">
<td>45</td><td></td><td></td><td><code> /// Registers a callback that will be called whenever `converter` is changed.</code></td>
</tr>
<tr class="noop" title="Line 46" id="line46">
<td>46</td><td></td><td></td><td><code> /// Returns an object that can be used to unregister the callback by passing</code></td>
</tr>
<tr class="noop" title="Line 47" id="line47">
<td>47</td><td></td><td></td><td><code> /// it to [unregisterConverterChanged].</code></td>
</tr>
<tr class="lineCov" title="Line 48" id="line48">
<td>48</td><td></td><td>1</td><td><code> static Object onConverterChanged(void Function() handler) {</code></td>
</tr>
<tr class="lineCov" title="Line 49" id="line49">
<td>49</td><td></td><td>1</td><td><code> final key = Object();</code></td>
</tr>
<tr class="lineCov" title="Line 50" id="line50">
<td>50</td><td></td><td>3</td><td><code> _converterChangeHandlers[key] = handler;</code></td>
</tr>
<tr class="noop" title="Line 51" id="line51">
<td>51</td><td></td><td></td><td><code> return key;</code></td>
</tr>
<tr class="noop" title="Line 52" id="line52">
<td>52</td><td></td><td></td><td><code> }</code></td>
</tr>
<tr class="noop" title="Line 53" id="line53">
<td>53</td><td></td><td></td><td><code></code></td>
</tr>
<tr class="noop" title="Line 54" id="line54">
<td>54</td><td></td><td></td><td><code> /// Unregisters a callback that was registered with [onConverterChanged].</code></td>
</tr>
<tr class="lineCov" title="Line 55" id="line55">
<td>55</td><td></td><td>1</td><td><code> static void unregisterConverterChanged(Object key) {</code></td>
</tr>
<tr class="lineCov" title="Line 56" id="line56">
<td>56</td><td></td><td>3</td><td><code> _converterChangeHandlers.remove(key);</code></td>
</tr>
<tr class="noop" title="Line 57" id="line57">
<td>57</td><td></td><td></td><td><code> }</code></td>
</tr>
<tr class="noop" title="Line 58" id="line58">
<td>58</td><td></td><td></td><td><code>}</code></td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 2 additions & 2 deletions doc/coverage/xml/index.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="jgenhtml.xsl"?><coverage branch-rate="NaN" branches-covered="0" branches-valid="0" complexity="0" date="2024-11-02" filename="index" function-rate="NaN" functions-covered="0" functions-valid="0" line-rate="0.8742112" lines-covered="2078" lines-valid="2377" testname="lcov.info" version="1.6">
<?xml-stylesheet type="text/xsl" href="jgenhtml.xsl"?><coverage branch-rate="NaN" branches-covered="0" branches-valid="0" complexity="0" date="2024-11-02" filename="index" function-rate="NaN" functions-covered="0" functions-valid="0" line-rate="0.87458193" lines-covered="2092" lines-valid="2392" testname="lcov.info" version="1.6">
<sources>
<source branches-hit="0" branches-valid="0" functions-hit="0" functions-valid="0" lines-hit="26" lines-valid="31" pathname="src/marshalers" prefix="/home/runner/work/squadron/squadron/lib/"/>
<source branches-hit="0" branches-valid="0" functions-hit="0" functions-valid="0" lines-hit="28" lines-valid="36" pathname="src" prefix="/home/runner/work/squadron/squadron/lib/"/>
<source branches-hit="0" branches-valid="0" functions-hit="0" functions-valid="0" lines-hit="42" lines-valid="51" pathname="src" prefix="/home/runner/work/squadron/squadron/lib/"/>
<source branches-hit="0" branches-valid="0" functions-hit="0" functions-valid="0" lines-hit="287" lines-valid="368" pathname="src/_impl/xplat" prefix="/home/runner/work/squadron/squadron/lib/"/>
<source branches-hit="0" branches-valid="0" functions-hit="0" functions-valid="0" lines-hit="563" lines-valid="571" pathname="src/converters" prefix="/home/runner/work/squadron/squadron/lib/"/>
<source branches-hit="0" branches-valid="0" functions-hit="0" functions-valid="0" lines-hit="262" lines-valid="319" pathname="src/_impl/web" prefix="/home/runner/work/squadron/squadron/lib/"/>
Expand Down
Loading

0 comments on commit 05052a0

Please sign in to comment.