Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added unit test for uuid, fixed bugs in uuid

  • Loading branch information...
commit 4376f8059335ac7ff6150b83e7d31ae9a125774b 1 parent f6db00b
Russ Bradberry devdazed authored
2  test/coverage/column.html
@@ -270,7 +270,7 @@ <h2 class='stats'>
270 270 <div class='content'>
271 271 <p>
272 272 <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
273   - class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
  273 + class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
274 274 </p>
275 275 </div>
276 276 </div>
4 test/coverage/column_family.html
@@ -461,7 +461,7 @@ <h2 class='stats'>
461 461
462 462 <p id='t46' class='stm run'>&nbsp;&nbsp;this.columns&nbsp;=&nbsp;{};<span class='strut'>&nbsp;</span></p>
463 463
464   - <p id='t47' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
  464 + <p id='t47' class='pln'><span class='strut'>&nbsp;</span></p>
465 465
466 466 <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>
467 467
@@ -686,7 +686,7 @@ <h2 class='stats'>
686 686 <div class='content'>
687 687 <p>
688 688 <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
689   - class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
  689 + class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
690 690 </p>
691 691 </div>
692 692 </div>
2  test/coverage/connection.html
@@ -1750,7 +1750,7 @@ <h2 class='stats'>
1750 1750 <div class='content'>
1751 1751 <p>
1752 1752 <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
1753   - class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
  1753 + class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
1754 1754 </p>
1755 1755 </div>
1756 1756 </div>
2  test/coverage/helenus.html
@@ -402,7 +402,7 @@ <h2 class='stats'>
402 402 <div class='content'>
403 403 <p>
404 404 <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
405   - class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
  405 + class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
406 406 </p>
407 407 </div>
408 408 </div>
16 test/coverage/index.html
@@ -17,7 +17,7 @@
17 17 <div id='header'>
18 18 <div class='content'>
19 19 <h1>Coverage report:
20   - <span class='pc_cov'>83.81%</span>
  20 + <span class='pc_cov'>84.97%</span>
21 21 </h1>
22 22 <img id='keyboard_icon' src='keybd_closed.png'>
23 23 </div>
@@ -53,10 +53,10 @@
53 53 <tfoot>
54 54 <tr class='total'>
55 55 <td class='name left'>Total</td>
56   - <td>502</td>
57   - <td>97</td>
  56 + <td>509</td>
  57 + <td>90</td>
58 58
59   - <td class='right'>83.81%</td>
  59 + <td class='right'>84.97%</td>
60 60 </tr>
61 61 </tfoot>
62 62 <tbody>
@@ -119,10 +119,10 @@
119 119
120 120 <tr class='file'>
121 121 <td class='name left'><a href='uuid.html'>uuid.js</a></td>
122   - <td>23</td>
123   - <td>7</td>
  122 + <td>30</td>
  123 + <td>0</td>
124 124
125   - <td class='right'>76.67%</td>
  125 + <td class='right'>100.00%</td>
126 126 </tr>
127 127
128 128 <tr class='file'>
@@ -156,7 +156,7 @@
156 156 <div id='footer'>
157 157 <div class='content'>
158 158 <p>
159   - <a class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a> |
  159 + <a class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a> |
160 160 template taken from <a class='nav' href='http://nedbatchelder.com/code/coverage/'>coverage.py</a>
161 161 </p>
162 162 </div>
12 test/coverage/keyspace.html
@@ -469,7 +469,7 @@ <h2 class='stats'>
469 469
470 470 <p id='t11' class='stm run'>var&nbsp;NOOP&nbsp;=&nbsp;function(){};<span class='strut'>&nbsp;</span></p>
471 471
472   - <p id='t12' class='pln'>&nbsp;<span class='strut'>&nbsp;</span></p>
  472 + <p id='t12' class='pln'><span class='strut'>&nbsp;</span></p>
473 473
474 474 <p id='t13' class='pln'>/**<span class='strut'>&nbsp;</span></p>
475 475
@@ -721,7 +721,7 @@ <h2 class='stats'>
721 721
722 722 <p id='t137' class='stm run'>&nbsp;&nbsp;options&nbsp;=&nbsp;options&nbsp;||&nbsp;{};<span class='strut'>&nbsp;</span></p>
723 723
724   - <p id='t138' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
  724 + <p id='t138' class='pln'><span class='strut'>&nbsp;</span></p>
725 725
726 726 <p id='t139' class='stm run'>&nbsp;&nbsp;var&nbsp;meta;<span class='strut'>&nbsp;</span></p>
727 727
@@ -731,13 +731,13 @@ <h2 class='stats'>
731 731
732 732 <p id='t142' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;meta&nbsp;=&nbsp;[];<span class='strut'>&nbsp;</span></p>
733 733
734   - <p id='t143' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
  734 + <p id='t143' class='pln'><span class='strut'>&nbsp;</span></p>
735 735
736 736 <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>
737 737
738 738 <p id='t145' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;col&nbsp;=&nbsp;options.columns[i];<span class='strut'>&nbsp;</span></p>
739 739
740   - <p id='t146' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
  740 + <p id='t146' class='pln'><span class='strut'>&nbsp;</span></p>
741 741
742 742 <p id='t147' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;meta.push(new&nbsp;ttypes.ColumnDef({<span class='strut'>&nbsp;</span></p>
743 743
@@ -757,7 +757,7 @@ <h2 class='stats'>
757 757
758 758 <p id='t155' class='pln'>&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
759 759
760   - <p id='t156' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
  760 + <p id='t156' class='pln'><span class='strut'>&nbsp;</span></p>
761 761
762 762 <p id='t157' class='stm run'>&nbsp;&nbsp;var&nbsp;cfdef&nbsp;=&nbsp;new&nbsp;ttypes.CfDef({<span class='strut'>&nbsp;</span></p>
763 763
@@ -842,7 +842,7 @@ <h2 class='stats'>
842 842 <div class='content'>
843 843 <p>
844 844 <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
845   - class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
  845 + class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
846 846 </p>
847 847 </div>
848 848 </div>
4 test/coverage/marshal_deserializers.html
@@ -329,7 +329,7 @@ <h2 class='stats'>
329 329
330 330 <p id='t1' class='stm run'>var&nbsp;UUID&nbsp;=&nbsp;require('../uuid').UUID,<span class='strut'>&nbsp;</span></p>
331 331
332   - <p id='t2' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;TimeUUID&nbsp;=&nbsp;require('../uuid').UUID;<span class='strut'>&nbsp;</span></p>
  332 + <p id='t2' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;TimeUUID&nbsp;=&nbsp;require('../uuid').TimeUUID;<span class='strut'>&nbsp;</span></p>
333 333
334 334 <p id='t3' class='pln'><span class='strut'>&nbsp;</span></p>
335 335
@@ -602,7 +602,7 @@ <h2 class='stats'>
602 602 <div class='content'>
603 603 <p>
604 604 <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
605   - class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
  605 + class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
606 606 </p>
607 607 </div>
608 608 </div>
8 test/coverage/marshal_index.html
@@ -513,9 +513,9 @@ <h2 class='stats'>
513 513
514 514 <p id='t22' class='pln'>&nbsp;&nbsp;'AsciiType':&nbsp;{&nbsp;ser:Serializers.encodeAscii,&nbsp;de:Deserializers.decodeAscii&nbsp;},<span class='strut'>&nbsp;</span></p>
515 515
516   - <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>
  516 + <p id='t23' class='pln'>&nbsp;&nbsp;'LexicalUUIDType':&nbsp;{&nbsp;ser:Serializers.encodeUUID,&nbsp;de:Deserializers.decodeUUID&nbsp;},<span class='strut'>&nbsp;</span></p>
517 517
518   - <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>
  518 + <p id='t24' class='pln'>&nbsp;&nbsp;'TimeUUIDType':&nbsp;{&nbsp;ser:Serializers.encodeTimeUUID,&nbsp;de:Deserializers.decodeTimeUUID&nbsp;},<span class='strut'>&nbsp;</span></p>
519 519
520 520 <p id='t25' class='pln'>&nbsp;&nbsp;'CounterColumnType':&nbsp;{&nbsp;ser:NOOP,&nbsp;de:NOOP&nbsp;},<span class='strut'>&nbsp;</span></p>
521 521
@@ -527,7 +527,7 @@ <h2 class='stats'>
527 527
528 528 <p id='t29' class='pln'>&nbsp;&nbsp;'BooleanType':{&nbsp;ser:Serializers.encodeBoolean,&nbsp;de:Deserializers.decodeBoolean&nbsp;},<span class='strut'>&nbsp;</span></p>
529 529
530   - <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>
  530 + <p id='t30' class='pln'>&nbsp;&nbsp;'UUIDType':&nbsp;{&nbsp;ser:Serializers.encodeUUID,&nbsp;de:Deserializers.decodeUUID&nbsp;}<span class='strut'>&nbsp;</span></p>
531 531
532 532 <p id='t31' class='pln'>};<span class='strut'>&nbsp;</span></p>
533 533
@@ -886,7 +886,7 @@ <h2 class='stats'>
886 886 <div class='content'>
887 887 <p>
888 888 <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
889   - class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
  889 + class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
890 890 </p>
891 891 </div>
892 892 </div>
2  test/coverage/marshal_serializers.html
@@ -770,7 +770,7 @@ <h2 class='stats'>
770 770 <div class='content'>
771 771 <p>
772 772 <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
773   - class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
  773 + class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
774 774 </p>
775 775 </div>
776 776 </div>
2  test/coverage/pool.html
@@ -906,7 +906,7 @@ <h2 class='stats'>
906 906 <div class='content'>
907 907 <p>
908 908 <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
909   - class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
  909 + class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
910 910 </p>
911 911 </div>
912 912 </div>
16 test/coverage/row.html
@@ -485,11 +485,11 @@ <h2 class='stats'>
485 485
486 486 <p id='t54' class='stm run'>Row.fromThrift&nbsp;=&nbsp;function(key,&nbsp;columns,&nbsp;cf){<span class='strut'>&nbsp;</span></p>
487 487
488   - <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>
  488 + <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>
489 489
490 490 <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>
491 491
492   - <p id='t57' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
  492 + <p id='t57' class='pln'><span class='strut'>&nbsp;</span></p>
493 493
494 494 <p id='t58' class='pln'>&nbsp;&nbsp;//TODO:&nbsp;Implement&nbsp;counter&nbsp;and&nbsp;super&nbsp;columns<span class='strut'>&nbsp;</span></p>
495 495
@@ -497,9 +497,9 @@ <h2 class='stats'>
497 497
498 498 <p id='t60' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;data.columns.push(&nbsp;columns[i].column&nbsp;);<span class='strut'>&nbsp;</span></p>
499 499
500   - <p id='t61' class='pln'>&nbsp;&nbsp;}&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
  500 + <p id='t61' class='pln'>&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
501 501
502   - <p id='t62' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
  502 + <p id='t62' class='pln'><span class='strut'>&nbsp;</span></p>
503 503
504 504 <p id='t63' class='stm run'>&nbsp;&nbsp;schema.value_types&nbsp;=&nbsp;{};<span class='strut'>&nbsp;</span></p>
505 505
@@ -507,7 +507,7 @@ <h2 class='stats'>
507 507
508 508 <p id='t65' class='stm run'>&nbsp;&nbsp;schema.default_name_type&nbsp;=&nbsp;cf.definition.comparator_type;<span class='strut'>&nbsp;</span></p>
509 509
510   - <p id='t66' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
  510 + <p id='t66' class='pln'><span class='strut'>&nbsp;</span></p>
511 511
512 512 <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>
513 513
@@ -515,7 +515,7 @@ <h2 class='stats'>
515 515
516 516 <p id='t69' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;item;<span class='strut'>&nbsp;</span></p>
517 517
518   - <p id='t70' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
  518 + <p id='t70' class='pln'><span class='strut'>&nbsp;</span></p>
519 519
520 520 <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>
521 521
@@ -527,7 +527,7 @@ <h2 class='stats'>
527 527
528 528 <p id='t75' class='pln'>&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
529 529
530   - <p id='t76' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
  530 + <p id='t76' class='pln'><span class='strut'>&nbsp;</span></p>
531 531
532 532 <p id='t77' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Row(data,&nbsp;schema);<span class='strut'>&nbsp;</span></p>
533 533
@@ -702,7 +702,7 @@ <h2 class='stats'>
702 702 <div class='content'>
703 703 <p>
704 704 <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
705   - class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
  705 + class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
706 706 </p>
707 707 </div>
708 708 </div>
40 test/coverage/uuid.html
@@ -5,7 +5,7 @@
5 5
6 6
7 7 <meta http-equiv='X-UA-Compatible' content='IE=emulateIE7' />
8   - <title>Coverage for uuid.js: 76.67%</title>
  8 + <title>Coverage for uuid.js: 100.00%</title>
9 9 <link rel='stylesheet' href='style.css' type='text/css'>
10 10 <script type='text/javascript' src='jquery-1.4.3.min.js'></script>
11 11 <script type='text/javascript' src='jquery.hotkeys.js'></script>
@@ -20,13 +20,13 @@
20 20 <div id='header'>
21 21 <div class='content'>
22 22 <h1>Coverage for <b>uuid.js</b> :
23   - <span class='pc_cov'>76.67%</span>
  23 + <span class='pc_cov'>100.00%</span>
24 24 </h1>
25 25 <img id='keyboard_icon' src='keybd_closed.png'>
26 26 <h2 class='stats'>
27 27 statements
28   - <span class=' shortkey_r' onclick='coverage.toggle_lines(this, "run")'>23 hits</span>
29   - <span class=' shortkey_m' onclick='coverage.toggle_lines(this, "mis")'>7 missing</span>
  28 + <span class=' shortkey_r' onclick='coverage.toggle_lines(this, "run")'>30 hits</span>
  29 + <span class=' shortkey_m' onclick='coverage.toggle_lines(this, "mis")'>0 missing</span>
30 30 <span class=' shortkey_x' onclick='coverage.toggle_lines(this, "exc")'>30 lines</span>
31 31 </h2>
32 32 </div>
@@ -78,7 +78,7 @@ <h2 class='stats'>
78 78
79 79 <p id='n10' class='stm run'><a href='#n10'>10</a></p>
80 80
81   - <p id='n11' class='stm mis'><a href='#n11'>11</a></p>
  81 + <p id='n11' class='stm run'><a href='#n11'>11</a></p>
82 82
83 83 <p id='n12' class='pln'><a href='#n12'>12</a></p>
84 84
@@ -112,7 +112,7 @@ <h2 class='stats'>
112 112
113 113 <p id='n27' class='stm run'><a href='#n27'>27</a></p>
114 114
115   - <p id='n28' class='stm mis'><a href='#n28'>28</a></p>
  115 + <p id='n28' class='stm run'><a href='#n28'>28</a></p>
116 116
117 117 <p id='n29' class='pln'><a href='#n29'>29</a></p>
118 118
@@ -126,7 +126,7 @@ <h2 class='stats'>
126 126
127 127 <p id='n34' class='stm run'><a href='#n34'>34</a></p>
128 128
129   - <p id='n35' class='stm mis'><a href='#n35'>35</a></p>
  129 + <p id='n35' class='stm run'><a href='#n35'>35</a></p>
130 130
131 131 <p id='n36' class='pln'><a href='#n36'>36</a></p>
132 132
@@ -140,7 +140,7 @@ <h2 class='stats'>
140 140
141 141 <p id='n41' class='stm run'><a href='#n41'>41</a></p>
142 142
143   - <p id='n42' class='stm mis'><a href='#n42'>42</a></p>
  143 + <p id='n42' class='stm run'><a href='#n42'>42</a></p>
144 144
145 145 <p id='n43' class='pln'><a href='#n43'>43</a></p>
146 146
@@ -156,7 +156,7 @@ <h2 class='stats'>
156 156
157 157 <p id='n49' class='stm run'><a href='#n49'>49</a></p>
158 158
159   - <p id='n50' class='stm mis'><a href='#n50'>50</a></p>
  159 + <p id='n50' class='stm run'><a href='#n50'>50</a></p>
160 160
161 161 <p id='n51' class='pln'><a href='#n51'>51</a></p>
162 162
@@ -216,7 +216,7 @@ <h2 class='stats'>
216 216
217 217 <p id='n79' class='stm run'><a href='#n79'>79</a></p>
218 218
219   - <p id='n80' class='stm mis'><a href='#n80'>80</a></p>
  219 + <p id='n80' class='stm run'><a href='#n80'>80</a></p>
220 220
221 221 <p id='n81' class='pln'><a href='#n81'>81</a></p>
222 222
@@ -248,7 +248,7 @@ <h2 class='stats'>
248 248
249 249 <p id='n95' class='stm run'><a href='#n95'>95</a></p>
250 250
251   - <p id='n96' class='stm mis'><a href='#n96'>96</a></p>
  251 + <p id='n96' class='stm run'><a href='#n96'>96</a></p>
252 252
253 253 <p id='n97' class='pln'><a href='#n97'>97</a></p>
254 254
@@ -281,7 +281,7 @@ <h2 class='stats'>
281 281
282 282 <p id='t10' class='stm run'>&nbsp;&nbsp;if(id){<span class='strut'>&nbsp;</span></p>
283 283
284   - <p id='t11' class='stm mis'>&nbsp;&nbsp;&nbsp;&nbsp;this.hex&nbsp;=&nbsp;id;<span class='strut'>&nbsp;</span></p>
  284 + <p id='t11' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;this.hex&nbsp;=&nbsp;id;<span class='strut'>&nbsp;</span></p>
285 285
286 286 <p id='t12' class='pln'>&nbsp;&nbsp;}&nbsp;else&nbsp;{<span class='strut'>&nbsp;</span></p>
287 287
@@ -315,7 +315,7 @@ <h2 class='stats'>
315 315
316 316 <p id='t27' class='stm run'>UUID.prototype.toBinary&nbsp;=&nbsp;function(){<span class='strut'>&nbsp;</span></p>
317 317
318   - <p id='t28' class='stm mis'>&nbsp;&nbsp;return&nbsp;this.toBuffer().toString('binary');<span class='strut'>&nbsp;</span></p>
  318 + <p id='t28' class='stm run'>&nbsp;&nbsp;return&nbsp;this.toBuffer().toString('binary');<span class='strut'>&nbsp;</span></p>
319 319
320 320 <p id='t29' class='pln'>};<span class='strut'>&nbsp;</span></p>
321 321
@@ -329,7 +329,7 @@ <h2 class='stats'>
329 329
330 330 <p id='t34' class='stm run'>UUID.prototype.inspect&nbsp;=&nbsp;function(){<span class='strut'>&nbsp;</span></p>
331 331
332   - <p id='t35' class='stm mis'>&nbsp;&nbsp;return&nbsp;this.hex;<span class='strut'>&nbsp;</span></p>
  332 + <p id='t35' class='stm run'>&nbsp;&nbsp;return&nbsp;this.hex;<span class='strut'>&nbsp;</span></p>
333 333
334 334 <p id='t36' class='pln'>};<span class='strut'>&nbsp;</span></p>
335 335
@@ -343,7 +343,7 @@ <h2 class='stats'>
343 343
344 344 <p id='t41' class='stm run'>UUID.prototype.toString&nbsp;=&nbsp;function(){<span class='strut'>&nbsp;</span></p>
345 345
346   - <p id='t42' class='stm mis'>&nbsp;&nbsp;return&nbsp;this.inspect();<span class='strut'>&nbsp;</span></p>
  346 + <p id='t42' class='stm run'>&nbsp;&nbsp;return&nbsp;this.inspect();<span class='strut'>&nbsp;</span></p>
347 347
348 348 <p id='t43' class='pln'>};<span class='strut'>&nbsp;</span></p>
349 349
@@ -359,7 +359,7 @@ <h2 class='stats'>
359 359
360 360 <p id='t49' class='stm run'>UUID.fromBuffer&nbsp;=&nbsp;function(buf){<span class='strut'>&nbsp;</span></p>
361 361
362   - <p id='t50' class='stm mis'>&nbsp;&nbsp;return&nbsp;new&nbsp;UUID(NodeUUID.unparse(buf));<span class='strut'>&nbsp;</span></p>
  362 + <p id='t50' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;UUID(NodeUUID.unparse(buf));<span class='strut'>&nbsp;</span></p>
363 363
364 364 <p id='t51' class='pln'>};<span class='strut'>&nbsp;</span></p>
365 365
@@ -419,7 +419,7 @@ <h2 class='stats'>
419 419
420 420 <p id='t79' class='stm run'>TimeUUID.fromTimestamp&nbsp;=&nbsp;function(ts){<span class='strut'>&nbsp;</span></p>
421 421
422   - <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>
  422 + <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>
423 423
424 424 <p id='t81' class='pln'>};<span class='strut'>&nbsp;</span></p>
425 425
@@ -433,7 +433,7 @@ <h2 class='stats'>
433 433
434 434 <p id='t86' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
435 435
436   - <p id='t87' class='stm run'>UUID.fromBuffer&nbsp;=&nbsp;function(buf){<span class='strut'>&nbsp;</span></p>
  436 + <p id='t87' class='stm run'>TimeUUID.fromBuffer&nbsp;=&nbsp;function(buf){<span class='strut'>&nbsp;</span></p>
437 437
438 438 <p id='t88' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;TimeUUID(NodeUUID.unparse(buf));<span class='strut'>&nbsp;</span></p>
439 439
@@ -451,7 +451,7 @@ <h2 class='stats'>
451 451
452 452 <p id='t95' class='stm run'>TimeUUID.fromBinary&nbsp;=&nbsp;function(bin){<span class='strut'>&nbsp;</span></p>
453 453
454   - <p id='t96' class='stm mis'>&nbsp;&nbsp;return&nbsp;TimeUUID.fromBuffer(new&nbsp;Buffer(bin,&nbsp;'binary'));<span class='strut'>&nbsp;</span></p>
  454 + <p id='t96' class='stm run'>&nbsp;&nbsp;return&nbsp;TimeUUID.fromBuffer(new&nbsp;Buffer(bin,&nbsp;'binary'));<span class='strut'>&nbsp;</span></p>
455 455
456 456 <p id='t97' class='pln'>};<span class='strut'>&nbsp;</span></p>
457 457
@@ -470,7 +470,7 @@ <h2 class='stats'>
470 470 <div class='content'>
471 471 <p>
472 472 <a class='nav' href='index.html'>&#xab; index</a> &nbsp; &nbsp; <a
473   - class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.3</a>
  473 + class='nav' href='https://github.com/cloudkick/whiskey'>whiskey v0.6.5</a>
474 474 </p>
475 475 </div>
476 476 </div>
2  test/thrift.js
@@ -227,7 +227,7 @@ module.exports = {
227 227 assert.ifError(err);
228 228 cf_standard.get(key, function(err, row){
229 229 assert.ifError(err);
230   - var col = row.get('timeuuid-test');
  230 + var col = row.get('timeuuid-test');
231 231 assert.ok(col.value instanceof Helenus.TimeUUID);
232 232 assert.ok(col.value.hex.length === 36);
233 233 test.finish();
24 test/units.js
... ... @@ -0,0 +1,24 @@
  1 +var Helenus;
  2 +
  3 +module.exports = {
  4 + 'setUp':function(test, assert){
  5 + Helenus = require('helenus');
  6 + test.finish();
  7 + },
  8 +
  9 + 'test uuid library': function(test, assert){
  10 + var v4 = new Helenus.UUID('e59578a0-bf3f-47b4-bcf0-94f9279271cc'),
  11 + v4buf = new Buffer([0xe5, 0x95, 0x78, 0xa0, 0xbf, 0x3f, 0x47, 0xb4, 0xbc, 0xf0, 0x94, 0xf9, 0x27, 0x92, 0x71, 0xcc]);
  12 +
  13 + assert.ok(v4.hex === 'e59578a0-bf3f-47b4-bcf0-94f9279271cc');
  14 + assert.ok(v4.toBinary() === v4buf.toString('binary'));
  15 + assert.ok(v4.toString() === 'e59578a0-bf3f-47b4-bcf0-94f9279271cc');
  16 +
  17 + var v1 = new Helenus.TimeUUID.fromTimestamp(new Date(1326400762701)),
  18 + v1buf = v1.toBuffer();
  19 +
  20 +
  21 + assert.ok(v1.hex === (new Helenus.TimeUUID.fromBinary(v1buf.toString('binary')).hex));
  22 + test.finish();
  23 + },
  24 +};

0 comments on commit 4376f80

Please sign in to comment.
Something went wrong with that request. Please try again.