Browse files

added unit test for uuid, fixed bugs in uuid

  • Loading branch information...
1 parent f6db00b commit 4376f8059335ac7ff6150b83e7d31ae9a125774b @devdazed devdazed committed Jan 12, 2012
View
2 test/coverage/column.html
@@ -270,7 +270,7 @@ <h2 class='stats'>
<div class='content'>
<p>
<a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
- class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
</p>
</div>
</div>
View
4 test/coverage/column_family.html
@@ -461,7 +461,7 @@ <h2 class='stats'>
<p id='t46' class='stm run'>&nbsp;&nbsp;this.columns&nbsp;=&nbsp;{};<span class='strut'>&nbsp;</span></p>
- <p id='t47' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+ <p id='t47' class='pln'><span class='strut'>&nbsp;</span></p>
<p id='t48' class='stm run'>&nbsp;&nbsp;if(definition.column_metadata&nbsp;&amp;&amp;&nbsp;Array.isArray(definition.column_metadata)){<span class='strut'>&nbsp;</span></p>
@@ -686,7 +686,7 @@ <h2 class='stats'>
<div class='content'>
<p>
<a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
- class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
</p>
</div>
</div>
View
2 test/coverage/connection.html
@@ -1750,7 +1750,7 @@ <h2 class='stats'>
<div class='content'>
<p>
<a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
- class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
</p>
</div>
</div>
View
2 test/coverage/helenus.html
@@ -402,7 +402,7 @@ <h2 class='stats'>
<div class='content'>
<p>
<a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
- class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
</p>
</div>
</div>
View
16 test/coverage/index.html
@@ -17,7 +17,7 @@
<div id='header'>
<div class='content'>
<h1>Coverage report:
- <span class='pc_cov'>83.81%</span>
+ <span class='pc_cov'>84.97%</span>
</h1>
<img id='keyboard_icon' src='keybd_closed.png'>
</div>
@@ -53,10 +53,10 @@
<tfoot>
<tr class='total'>
<td class='name left'>Total</td>
- <td>502</td>
- <td>97</td>
+ <td>509</td>
+ <td>90</td>
- <td class='right'>83.81%</td>
+ <td class='right'>84.97%</td>
</tr>
</tfoot>
<tbody>
@@ -119,10 +119,10 @@
<tr class='file'>
<td class='name left'><a href='uuid.html'>uuid.js</a></td>
- <td>23</td>
- <td>7</td>
+ <td>30</td>
+ <td>0</td>
- <td class='right'>76.67%</td>
+ <td class='right'>100.00%</td>
</tr>
<tr class='file'>
@@ -156,7 +156,7 @@
<div id='footer'>
<div class='content'>
<p>
- <a class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a> |
+ <a class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a> |
template taken from <a class='nav' href='http://nedbatchelder.com/code/coverage/'>coverage.py</a>
</p>
</div>
View
12 test/coverage/keyspace.html
@@ -469,7 +469,7 @@ <h2 class='stats'>
<p id='t11' class='stm run'>var&nbsp;NOOP&nbsp;=&nbsp;function(){};<span class='strut'>&nbsp;</span></p>
- <p id='t12' class='pln'>&nbsp;<span class='strut'>&nbsp;</span></p>
+ <p id='t12' class='pln'><span class='strut'>&nbsp;</span></p>
<p id='t13' class='pln'>/**<span class='strut'>&nbsp;</span></p>
@@ -721,7 +721,7 @@ <h2 class='stats'>
<p id='t137' class='stm run'>&nbsp;&nbsp;options&nbsp;=&nbsp;options&nbsp;||&nbsp;{};<span class='strut'>&nbsp;</span></p>
- <p id='t138' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+ <p id='t138' class='pln'><span class='strut'>&nbsp;</span></p>
<p id='t139' class='stm run'>&nbsp;&nbsp;var&nbsp;meta;<span class='strut'>&nbsp;</span></p>
@@ -731,13 +731,13 @@ <h2 class='stats'>
<p id='t142' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;meta&nbsp;=&nbsp;[];<span class='strut'>&nbsp;</span></p>
- <p id='t143' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+ <p id='t143' class='pln'><span class='strut'>&nbsp;</span></p>
<p id='t144' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;for(;&nbsp;i&nbsp;&lt;&nbsp;len;&nbsp;i&nbsp;+=&nbsp;1){<span class='strut'>&nbsp;</span></p>
<p id='t145' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;col&nbsp;=&nbsp;options.columns[i];<span class='strut'>&nbsp;</span></p>
- <p id='t146' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+ <p id='t146' class='pln'><span class='strut'>&nbsp;</span></p>
<p id='t147' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;meta.push(new&nbsp;ttypes.ColumnDef({<span class='strut'>&nbsp;</span></p>
@@ -757,7 +757,7 @@ <h2 class='stats'>
<p id='t155' class='pln'>&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
- <p id='t156' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+ <p id='t156' class='pln'><span class='strut'>&nbsp;</span></p>
<p id='t157' class='stm run'>&nbsp;&nbsp;var&nbsp;cfdef&nbsp;=&nbsp;new&nbsp;ttypes.CfDef({<span class='strut'>&nbsp;</span></p>
@@ -842,7 +842,7 @@ <h2 class='stats'>
<div class='content'>
<p>
<a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
- class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
</p>
</div>
</div>
View
4 test/coverage/marshal_deserializers.html
@@ -329,7 +329,7 @@ <h2 class='stats'>
<p id='t1' class='stm run'>var&nbsp;UUID&nbsp;=&nbsp;require('../uuid').UUID,<span class='strut'>&nbsp;</span></p>
- <p id='t2' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;TimeUUID&nbsp;=&nbsp;require('../uuid').UUID;<span class='strut'>&nbsp;</span></p>
+ <p id='t2' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;TimeUUID&nbsp;=&nbsp;require('../uuid').TimeUUID;<span class='strut'>&nbsp;</span></p>
<p id='t3' class='pln'><span class='strut'>&nbsp;</span></p>
@@ -602,7 +602,7 @@ <h2 class='stats'>
<div class='content'>
<p>
<a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
- class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
</p>
</div>
</div>
View
8 test/coverage/marshal_index.html
@@ -513,9 +513,9 @@ <h2 class='stats'>
<p id='t22' class='pln'>&nbsp;&nbsp;'AsciiType':&nbsp;{&nbsp;ser:Serializers.encodeAscii,&nbsp;de:Deserializers.decodeAscii&nbsp;},<span class='strut'>&nbsp;</span></p>
- <p id='t23' class='pln'>&nbsp;&nbsp;'LexicalUUIDType':&nbsp;{&nbsp;ser:Serializers.encodeUUID,&nbsp;de:Deserializers.decodeUUID&nbsp;},&nbsp;//TODO:&nbsp;This&nbsp;may&nbsp;not&nbsp;be&nbsp;right<span class='strut'>&nbsp;</span></p>
+ <p id='t23' class='pln'>&nbsp;&nbsp;'LexicalUUIDType':&nbsp;{&nbsp;ser:Serializers.encodeUUID,&nbsp;de:Deserializers.decodeUUID&nbsp;},<span class='strut'>&nbsp;</span></p>
- <p id='t24' class='pln'>&nbsp;&nbsp;'TimeUUIDType':&nbsp;{&nbsp;ser:Serializers.encodeTimeUUID,&nbsp;de:Deserializers.decodeTimeUUID&nbsp;},&nbsp;&nbsp;&nbsp;&nbsp;//TODO:&nbsp;This&nbsp;may&nbsp;not&nbsp;be&nbsp;right<span class='strut'>&nbsp;</span></p>
+ <p id='t24' class='pln'>&nbsp;&nbsp;'TimeUUIDType':&nbsp;{&nbsp;ser:Serializers.encodeTimeUUID,&nbsp;de:Deserializers.decodeTimeUUID&nbsp;},<span class='strut'>&nbsp;</span></p>
<p id='t25' class='pln'>&nbsp;&nbsp;'CounterColumnType':&nbsp;{&nbsp;ser:NOOP,&nbsp;de:NOOP&nbsp;},<span class='strut'>&nbsp;</span></p>
@@ -527,7 +527,7 @@ <h2 class='stats'>
<p id='t29' class='pln'>&nbsp;&nbsp;'BooleanType':{&nbsp;ser:Serializers.encodeBoolean,&nbsp;de:Deserializers.decodeBoolean&nbsp;},<span class='strut'>&nbsp;</span></p>
- <p id='t30' class='pln'>&nbsp;&nbsp;'UUIDType':&nbsp;{&nbsp;ser:Serializers.encodeUUID,&nbsp;de:Deserializers.decodeUUID&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//TODO:&nbsp;This&nbsp;may&nbsp;not&nbsp;be&nbsp;right<span class='strut'>&nbsp;</span></p>
+ <p id='t30' class='pln'>&nbsp;&nbsp;'UUIDType':&nbsp;{&nbsp;ser:Serializers.encodeUUID,&nbsp;de:Deserializers.decodeUUID&nbsp;}<span class='strut'>&nbsp;</span></p>
<p id='t31' class='pln'>};<span class='strut'>&nbsp;</span></p>
@@ -886,7 +886,7 @@ <h2 class='stats'>
<div class='content'>
<p>
<a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
- class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
</p>
</div>
</div>
View
2 test/coverage/marshal_serializers.html
@@ -770,7 +770,7 @@ <h2 class='stats'>
<div class='content'>
<p>
<a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
- class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
</p>
</div>
</div>
View
2 test/coverage/pool.html
@@ -906,7 +906,7 @@ <h2 class='stats'>
<div class='content'>
<p>
<a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
- class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
</p>
</div>
</div>
View
16 test/coverage/row.html
@@ -485,37 +485,37 @@ <h2 class='stats'>
<p id='t54' class='stm run'>Row.fromThrift&nbsp;=&nbsp;function(key,&nbsp;columns,&nbsp;cf){<span class='strut'>&nbsp;</span></p>
- <p id='t55' class='stm run'>&nbsp;&nbsp;var&nbsp;data&nbsp;=&nbsp;{&nbsp;columns:&nbsp;[],&nbsp;key:key&nbsp;},&nbsp;<span class='strut'>&nbsp;</span></p>
+ <p id='t55' class='stm run'>&nbsp;&nbsp;var&nbsp;data&nbsp;=&nbsp;{&nbsp;columns:&nbsp;[],&nbsp;key:key&nbsp;},<span class='strut'>&nbsp;</span></p>
<p id='t56' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;schema&nbsp;=&nbsp;{},&nbsp;i&nbsp;=&nbsp;0,&nbsp;len&nbsp;=&nbsp;columns.length;<span class='strut'>&nbsp;</span></p>
- <p id='t57' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+ <p id='t57' class='pln'><span class='strut'>&nbsp;</span></p>
<p id='t58' class='pln'>&nbsp;&nbsp;//TODO:&nbsp;Implement&nbsp;counter&nbsp;and&nbsp;super&nbsp;columns<span class='strut'>&nbsp;</span></p>
<p id='t59' class='stm run'>&nbsp;&nbsp;for(;&nbsp;i&nbsp;&lt;&nbsp;len;&nbsp;i&nbsp;+=&nbsp;1){<span class='strut'>&nbsp;</span></p>
<p id='t60' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;data.columns.push(&nbsp;columns[i].column&nbsp;);<span class='strut'>&nbsp;</span></p>
- <p id='t61' class='pln'>&nbsp;&nbsp;}&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+ <p id='t61' class='pln'>&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
- <p id='t62' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+ <p id='t62' class='pln'><span class='strut'>&nbsp;</span></p>
<p id='t63' class='stm run'>&nbsp;&nbsp;schema.value_types&nbsp;=&nbsp;{};<span class='strut'>&nbsp;</span></p>
<p id='t64' class='stm run'>&nbsp;&nbsp;schema.default_value_type&nbsp;=&nbsp;cf.definition.default_validation_class;<span class='strut'>&nbsp;</span></p>
<p id='t65' class='stm run'>&nbsp;&nbsp;schema.default_name_type&nbsp;=&nbsp;cf.definition.comparator_type;<span class='strut'>&nbsp;</span></p>
- <p id='t66' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+ <p id='t66' class='pln'><span class='strut'>&nbsp;</span></p>
<p id='t67' class='stm run'>&nbsp;&nbsp;if(cf.definition.column_metadata&nbsp;&amp;&amp;&nbsp;Array.isArray(cf.definition.column_metadata)){<span class='strut'>&nbsp;</span></p>
<p id='t68' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;i&nbsp;=&nbsp;0;&nbsp;len&nbsp;=&nbsp;cf.definition.column_metadata.length;<span class='strut'>&nbsp;</span></p>
<p id='t69' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;item;<span class='strut'>&nbsp;</span></p>
- <p id='t70' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+ <p id='t70' class='pln'><span class='strut'>&nbsp;</span></p>
<p id='t71' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;for(;&nbsp;i&nbsp;&lt;&nbsp;len;&nbsp;i&nbsp;+=&nbsp;1){<span class='strut'>&nbsp;</span></p>
@@ -527,7 +527,7 @@ <h2 class='stats'>
<p id='t75' class='pln'>&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
- <p id='t76' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
+ <p id='t76' class='pln'><span class='strut'>&nbsp;</span></p>
<p id='t77' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Row(data,&nbsp;schema);<span class='strut'>&nbsp;</span></p>
@@ -702,7 +702,7 @@ <h2 class='stats'>
<div class='content'>
<p>
<a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
- class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
</p>
</div>
</div>
View
40 test/coverage/uuid.html
@@ -5,7 +5,7 @@
<meta http-equiv='X-UA-Compatible' content='IE=emulateIE7' />
- <title>Coverage for uuid.js: 76.67%</title>
+ <title>Coverage for uuid.js: 100.00%</title>
<link rel='stylesheet' href='style.css' type='text/css'>
<script type='text/javascript' src='jquery-1.4.3.min.js'></script>
<script type='text/javascript' src='jquery.hotkeys.js'></script>
@@ -20,13 +20,13 @@
<div id='header'>
<div class='content'>
<h1>Coverage for <b>uuid.js</b> :
- <span class='pc_cov'>76.67%</span>
+ <span class='pc_cov'>100.00%</span>
</h1>
<img id='keyboard_icon' src='keybd_closed.png'>
<h2 class='stats'>
statements
- <span class=' shortkey_r' onclick='coverage.toggle_lines(this, "run")'>23 hits</span>
- <span class=' shortkey_m' onclick='coverage.toggle_lines(this, "mis")'>7 missing</span>
+ <span class=' shortkey_r' onclick='coverage.toggle_lines(this, "run")'>30 hits</span>
+ <span class=' shortkey_m' onclick='coverage.toggle_lines(this, "mis")'>0 missing</span>
<span class=' shortkey_x' onclick='coverage.toggle_lines(this, "exc")'>30 lines</span>
</h2>
</div>
@@ -78,7 +78,7 @@ <h2 class='stats'>
<p id='n10' class='stm run'><a href='#n10'>10</a></p>
- <p id='n11' class='stm mis'><a href='#n11'>11</a></p>
+ <p id='n11' class='stm run'><a href='#n11'>11</a></p>
<p id='n12' class='pln'><a href='#n12'>12</a></p>
@@ -112,7 +112,7 @@ <h2 class='stats'>
<p id='n27' class='stm run'><a href='#n27'>27</a></p>
- <p id='n28' class='stm mis'><a href='#n28'>28</a></p>
+ <p id='n28' class='stm run'><a href='#n28'>28</a></p>
<p id='n29' class='pln'><a href='#n29'>29</a></p>
@@ -126,7 +126,7 @@ <h2 class='stats'>
<p id='n34' class='stm run'><a href='#n34'>34</a></p>
- <p id='n35' class='stm mis'><a href='#n35'>35</a></p>
+ <p id='n35' class='stm run'><a href='#n35'>35</a></p>
<p id='n36' class='pln'><a href='#n36'>36</a></p>
@@ -140,7 +140,7 @@ <h2 class='stats'>
<p id='n41' class='stm run'><a href='#n41'>41</a></p>
- <p id='n42' class='stm mis'><a href='#n42'>42</a></p>
+ <p id='n42' class='stm run'><a href='#n42'>42</a></p>
<p id='n43' class='pln'><a href='#n43'>43</a></p>
@@ -156,7 +156,7 @@ <h2 class='stats'>
<p id='n49' class='stm run'><a href='#n49'>49</a></p>
- <p id='n50' class='stm mis'><a href='#n50'>50</a></p>
+ <p id='n50' class='stm run'><a href='#n50'>50</a></p>
<p id='n51' class='pln'><a href='#n51'>51</a></p>
@@ -216,7 +216,7 @@ <h2 class='stats'>
<p id='n79' class='stm run'><a href='#n79'>79</a></p>
- <p id='n80' class='stm mis'><a href='#n80'>80</a></p>
+ <p id='n80' class='stm run'><a href='#n80'>80</a></p>
<p id='n81' class='pln'><a href='#n81'>81</a></p>
@@ -248,7 +248,7 @@ <h2 class='stats'>
<p id='n95' class='stm run'><a href='#n95'>95</a></p>
- <p id='n96' class='stm mis'><a href='#n96'>96</a></p>
+ <p id='n96' class='stm run'><a href='#n96'>96</a></p>
<p id='n97' class='pln'><a href='#n97'>97</a></p>
@@ -281,7 +281,7 @@ <h2 class='stats'>
<p id='t10' class='stm run'>&nbsp;&nbsp;if(id){<span class='strut'>&nbsp;</span></p>
- <p id='t11' class='stm mis'>&nbsp;&nbsp;&nbsp;&nbsp;this.hex&nbsp;=&nbsp;id;<span class='strut'>&nbsp;</span></p>
+ <p id='t11' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;this.hex&nbsp;=&nbsp;id;<span class='strut'>&nbsp;</span></p>
<p id='t12' class='pln'>&nbsp;&nbsp;}&nbsp;else&nbsp;{<span class='strut'>&nbsp;</span></p>
@@ -315,7 +315,7 @@ <h2 class='stats'>
<p id='t27' class='stm run'>UUID.prototype.toBinary&nbsp;=&nbsp;function(){<span class='strut'>&nbsp;</span></p>
- <p id='t28' class='stm mis'>&nbsp;&nbsp;return&nbsp;this.toBuffer().toString('binary');<span class='strut'>&nbsp;</span></p>
+ <p id='t28' class='stm run'>&nbsp;&nbsp;return&nbsp;this.toBuffer().toString('binary');<span class='strut'>&nbsp;</span></p>
<p id='t29' class='pln'>};<span class='strut'>&nbsp;</span></p>
@@ -329,7 +329,7 @@ <h2 class='stats'>
<p id='t34' class='stm run'>UUID.prototype.inspect&nbsp;=&nbsp;function(){<span class='strut'>&nbsp;</span></p>
- <p id='t35' class='stm mis'>&nbsp;&nbsp;return&nbsp;this.hex;<span class='strut'>&nbsp;</span></p>
+ <p id='t35' class='stm run'>&nbsp;&nbsp;return&nbsp;this.hex;<span class='strut'>&nbsp;</span></p>
<p id='t36' class='pln'>};<span class='strut'>&nbsp;</span></p>
@@ -343,7 +343,7 @@ <h2 class='stats'>
<p id='t41' class='stm run'>UUID.prototype.toString&nbsp;=&nbsp;function(){<span class='strut'>&nbsp;</span></p>
- <p id='t42' class='stm mis'>&nbsp;&nbsp;return&nbsp;this.inspect();<span class='strut'>&nbsp;</span></p>
+ <p id='t42' class='stm run'>&nbsp;&nbsp;return&nbsp;this.inspect();<span class='strut'>&nbsp;</span></p>
<p id='t43' class='pln'>};<span class='strut'>&nbsp;</span></p>
@@ -359,7 +359,7 @@ <h2 class='stats'>
<p id='t49' class='stm run'>UUID.fromBuffer&nbsp;=&nbsp;function(buf){<span class='strut'>&nbsp;</span></p>
- <p id='t50' class='stm mis'>&nbsp;&nbsp;return&nbsp;new&nbsp;UUID(NodeUUID.unparse(buf));<span class='strut'>&nbsp;</span></p>
+ <p id='t50' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;UUID(NodeUUID.unparse(buf));<span class='strut'>&nbsp;</span></p>
<p id='t51' class='pln'>};<span class='strut'>&nbsp;</span></p>
@@ -419,7 +419,7 @@ <h2 class='stats'>
<p id='t79' class='stm run'>TimeUUID.fromTimestamp&nbsp;=&nbsp;function(ts){<span class='strut'>&nbsp;</span></p>
- <p id='t80' class='stm mis'>&nbsp;&nbsp;return&nbsp;new&nbsp;TimeUUID(&nbsp;NodeUUID.v1({&nbsp;msecs:&nbsp;ts.getTime()&nbsp;})&nbsp;);<span class='strut'>&nbsp;</span></p>
+ <p id='t80' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;TimeUUID(&nbsp;NodeUUID.v1({&nbsp;msecs:&nbsp;ts.getTime()&nbsp;})&nbsp;);<span class='strut'>&nbsp;</span></p>
<p id='t81' class='pln'>};<span class='strut'>&nbsp;</span></p>
@@ -433,7 +433,7 @@ <h2 class='stats'>
<p id='t86' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
- <p id='t87' class='stm run'>UUID.fromBuffer&nbsp;=&nbsp;function(buf){<span class='strut'>&nbsp;</span></p>
+ <p id='t87' class='stm run'>TimeUUID.fromBuffer&nbsp;=&nbsp;function(buf){<span class='strut'>&nbsp;</span></p>
<p id='t88' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;TimeUUID(NodeUUID.unparse(buf));<span class='strut'>&nbsp;</span></p>
@@ -451,7 +451,7 @@ <h2 class='stats'>
<p id='t95' class='stm run'>TimeUUID.fromBinary&nbsp;=&nbsp;function(bin){<span class='strut'>&nbsp;</span></p>
- <p id='t96' class='stm mis'>&nbsp;&nbsp;return&nbsp;TimeUUID.fromBuffer(new&nbsp;Buffer(bin,&nbsp;'binary'));<span class='strut'>&nbsp;</span></p>
+ <p id='t96' class='stm run'>&nbsp;&nbsp;return&nbsp;TimeUUID.fromBuffer(new&nbsp;Buffer(bin,&nbsp;'binary'));<span class='strut'>&nbsp;</span></p>
<p id='t97' class='pln'>};<span class='strut'>&nbsp;</span></p>
@@ -470,7 +470,7 @@ <h2 class='stats'>
<div class='content'>
<p>
<a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
- class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
+ class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
</p>
</div>
</div>
View
2 test/thrift.js
@@ -227,7 +227,7 @@ module.exports = {
assert.ifError(err);
cf_standard.get(key, function(err, row){
assert.ifError(err);
- var col = row.get('timeuuid-test');
+ var col = row.get('timeuuid-test');
assert.ok(col.value instanceof Helenus.TimeUUID);
assert.ok(col.value.hex.length === 36);
test.finish();
View
24 test/units.js
@@ -0,0 +1,24 @@
+var Helenus;
+
+module.exports = {
+ 'setUp':function(test, assert){
+ Helenus = require('helenus');
+ test.finish();
+ },
+
+ 'test uuid library': function(test, assert){
+ var v4 = new Helenus.UUID('e59578a0-bf3f-47b4-bcf0-94f9279271cc'),
+ v4buf = new Buffer([0xe5, 0x95, 0x78, 0xa0, 0xbf, 0x3f, 0x47, 0xb4, 0xbc, 0xf0, 0x94, 0xf9, 0x27, 0x92, 0x71, 0xcc]);
+
+ assert.ok(v4.hex === 'e59578a0-bf3f-47b4-bcf0-94f9279271cc');
+ assert.ok(v4.toBinary() === v4buf.toString('binary'));
+ assert.ok(v4.toString() === 'e59578a0-bf3f-47b4-bcf0-94f9279271cc');
+
+ var v1 = new Helenus.TimeUUID.fromTimestamp(new Date(1326400762701)),
+ v1buf = v1.toBuffer();
+
+
+ assert.ok(v1.hex === (new Helenus.TimeUUID.fromBinary(v1buf.toString('binary')).hex));
+ test.finish();
+ },
+};

0 comments on commit 4376f80

Please sign in to comment.