https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3ATiming%2Ftestcases
Module:Timing/testcases - Revision history
2025-05-27T19:44:45Z
Revision history for this page on the wiki
MediaWiki 1.45.0-wmf.2
https://en.wikipedia.org/w/index.php?title=Module:Timing/testcases&diff=700173467&oldid=prev
Jeblad at 21:41, 16 January 2016
2016-01-16T21:41:39Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 21:41, 16 January 2016</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>require 'Module:BDD'()</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>require 'Module:BDD'()</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>local p = require('Module:<del style="font-weight: bold; text-decoration: none;">Profile</del>')</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>local p = require('Module:<ins style="font-weight: bold; text-decoration: none;">Timing</ins>')</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>describe({en='statistical analysis', nb='statistisk analyse'}, function()</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>describe({en='statistical analysis', nb='statistisk analyse'}, function()</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 40:</td>
<td colspan="2" class="diff-lineno">Line 40:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end)</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end)</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>return result('Module:<del style="font-weight: bold; text-decoration: none;">Profile</del>')</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>return result('Module:<ins style="font-weight: bold; text-decoration: none;">Timing</ins>')</div></td>
</tr>
</table>
Jeblad
https://en.wikipedia.org/w/index.php?title=Module:Timing/testcases&diff=700173313&oldid=prev
Jeblad: BDD is not available for the moment, stay tuned, it will arrive at a wiki nearby you...
2016-01-16T21:40:11Z
<p>BDD is not available for the moment, stay tuned, it will arrive at a wiki nearby you...</p>
<p><b>New page</b></p><div>require 'Module:BDD'()<br />
local p = require('Module:Profile')<br />
<br />
describe({en='statistical analysis', nb='statistisk analyse'}, function()<br />
context({en='for a constant serie', nb='for en konstant serie'}, function()<br />
it({en='should give mean', nb='skal finnes middelverdi'}, function()<br />
expect('"p.stats"', p.stats({ -1, -1, -1 })[1]):toBe( -1 )<br />
expect('"p.stats"', p.stats({ 0, 0 })[1]):toBe( 0 )<br />
expect('"p.stats"', p.stats({ 2, 2, 2, 2 })[1]):toBe( 2 )<br />
end)<br />
it({en='should give variance', nb='skal finnes varians'}, function()<br />
expect('"p.stats"', p.stats({ -1, -1, -1 })[2]):toBe( 0 )<br />
expect('"p.stats"', p.stats({ 0, 0 })[2]):toBe( 0 )<br />
expect('"p.stats"', p.stats({ 2, 2, 2, 2 })[2]):toBe( 0 )<br />
end)<br />
end)<br />
context({en='for an alternating serie', nb='for en vekslende serie'}, function()<br />
it({en='should give mean', nb='skal finnes middelverdi'}, function()<br />
expect('"p.stats"', p.stats({ -1, -1, 1, 1 })[1]):toBe( 0 )<br />
expect('"p.stats"', p.stats({ 2, 2, 4, 4 })[1]):toBe( 3 )<br />
end)<br />
it({en='should give variance', nb='skal finnes varians'}, function()<br />
expect('"p.stats"', p.stats({ -1, -1, 1, 1 })[2]):toBe( 1 )<br />
expect('"p.stats"', p.stats({ 2, 2, 4, 4 })[2]):toBe( 1 )<br />
end)<br />
end)<br />
end)<br />
<br />
describe({en='difference against a baseline', nb='forskjell mot en grunnlinje'}, function()<br />
context({en='for equal pairs', nb='for like par'}, function()<br />
it({en='should give mean', nb='skal finnes middelverdi'}, function()<br />
expect('"p.combine"', p.combine({ -1, 0 }, { -1, 0 })[1]):toBe( 0 )<br />
expect('"p.combine"', p.combine({ 2, 1 }, { 2, 1 })[1]):toBe( 0 )<br />
end)<br />
it({en='should give variance', nb='skal finnes varians'}, function()<br />
expect('"p.combine"', p.combine({ -1, 0 }, { -1, 0 })[2]):toBe( 0 )<br />
expect('"p.combine"', p.combine({ 2, 1 }, { 2, 1 })[2]):toBe( math.pow(2, 0.5) )<br />
end)<br />
end)<br />
end)<br />
<br />
return result('Module:Profile')</div>
Jeblad