Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added tests for column names and coverage reports

  • Loading branch information...
commit f2e8cbf1ee3e9e77af4932cc082085371b5b65ed 1 parent 1f440d6
@devdazed devdazed authored
View
156 test/coverage/column_family.html
@@ -25,9 +25,9 @@
<img id='keyboard_icon' src='keybd_closed.png'>
<h2 class='stats'>
statements
- <span class=' shortkey_r' onclick='coverage.toggle_lines(this, "run")'>59 hits</span>
+ <span class=' shortkey_r' onclick='coverage.toggle_lines(this, "run")'>62 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")'>59 lines</span>
+ <span class=' shortkey_x' onclick='coverage.toggle_lines(this, "exc")'>62 lines</span>
</h2>
</div>
</div>
@@ -324,7 +324,7 @@ <h2 class='stats'>
<p id='n133' class='pln'><a href='#n133'>133</a></p>
- <p id='n134' class='stm run'><a href='#n134'>134</a></p>
+ <p id='n134' class='pln'><a href='#n134'>134</a></p>
<p id='n135' class='stm run'><a href='#n135'>135</a></p>
@@ -332,53 +332,53 @@ <h2 class='stats'>
<p id='n137' class='stm run'><a href='#n137'>137</a></p>
- <p id='n138' class='pln'><a href='#n138'>138</a></p>
+ <p id='n138' class='stm run'><a href='#n138'>138</a></p>
<p id='n139' class='pln'><a href='#n139'>139</a></p>
- <p id='n140' class='stm run'><a href='#n140'>140</a></p>
+ <p id='n140' class='pln'><a href='#n140'>140</a></p>
- <p id='n141' class='pln'><a href='#n141'>141</a></p>
+ <p id='n141' class='stm run'><a href='#n141'>141</a></p>
- <p id='n142' class='stm run'><a href='#n142'>142</a></p>
+ <p id='n142' class='pln'><a href='#n142'>142</a></p>
- <p id='n143' class='pln'><a href='#n143'>143</a></p>
+ <p id='n143' class='stm run'><a href='#n143'>143</a></p>
<p id='n144' class='pln'><a href='#n144'>144</a></p>
- <p id='n145' class='stm run'><a href='#n145'>145</a></p>
+ <p id='n145' class='pln'><a href='#n145'>145</a></p>
- <p id='n146' class='pln'><a href='#n146'>146</a></p>
+ <p id='n146' class='stm run'><a href='#n146'>146</a></p>
<p id='n147' class='pln'><a href='#n147'>147</a></p>
<p id='n148' class='pln'><a href='#n148'>148</a></p>
- <p id='n149' class='stm run'><a href='#n149'>149</a></p>
+ <p id='n149' class='pln'><a href='#n149'>149</a></p>
- <p id='n150' class='pln'><a href='#n150'>150</a></p>
+ <p id='n150' class='stm run'><a href='#n150'>150</a></p>
<p id='n151' class='pln'><a href='#n151'>151</a></p>
- <p id='n152' class='pln'><a href='#n152'>152</a></p>
+ <p id='n152' class='stm run'><a href='#n152'>152</a></p>
- <p id='n153' class='pln'><a href='#n153'>153</a></p>
+ <p id='n153' class='stm run'><a href='#n153'>153</a></p>
<p id='n154' class='pln'><a href='#n154'>154</a></p>
- <p id='n155' class='pln'><a href='#n155'>155</a></p>
+ <p id='n155' class='stm run'><a href='#n155'>155</a></p>
<p id='n156' class='pln'><a href='#n156'>156</a></p>
<p id='n157' class='pln'><a href='#n157'>157</a></p>
- <p id='n158' class='stm run'><a href='#n158'>158</a></p>
+ <p id='n158' class='pln'><a href='#n158'>158</a></p>
- <p id='n159' class='stm run'><a href='#n159'>159</a></p>
+ <p id='n159' class='pln'><a href='#n159'>159</a></p>
- <p id='n160' class='stm run'><a href='#n160'>160</a></p>
+ <p id='n160' class='pln'><a href='#n160'>160</a></p>
- <p id='n161' class='stm run'><a href='#n161'>161</a></p>
+ <p id='n161' class='pln'><a href='#n161'>161</a></p>
<p id='n162' class='pln'><a href='#n162'>162</a></p>
@@ -386,21 +386,33 @@ <h2 class='stats'>
<p id='n164' class='stm run'><a href='#n164'>164</a></p>
- <p id='n165' class='pln'><a href='#n165'>165</a></p>
+ <p id='n165' class='stm run'><a href='#n165'>165</a></p>
- <p id='n166' class='pln'><a href='#n166'>166</a></p>
+ <p id='n166' class='stm run'><a href='#n166'>166</a></p>
<p id='n167' class='stm run'><a href='#n167'>167</a></p>
<p id='n168' class='pln'><a href='#n168'>168</a></p>
- <p id='n169' class='stm run'><a href='#n169'>169</a></p>
+ <p id='n169' class='pln'><a href='#n169'>169</a></p>
- <p id='n170' class='pln'><a href='#n170'>170</a></p>
+ <p id='n170' class='stm run'><a href='#n170'>170</a></p>
<p id='n171' class='pln'><a href='#n171'>171</a></p>
- <p id='n172' class='stm run'><a href='#n172'>172</a></p>
+ <p id='n172' class='pln'><a href='#n172'>172</a></p>
+
+ <p id='n173' class='stm run'><a href='#n173'>173</a></p>
+
+ <p id='n174' class='pln'><a href='#n174'>174</a></p>
+
+ <p id='n175' class='stm run'><a href='#n175'>175</a></p>
+
+ <p id='n176' class='pln'><a href='#n176'>176</a></p>
+
+ <p id='n177' class='pln'><a href='#n177'>177</a></p>
+
+ <p id='n178' class='stm run'><a href='#n178'>178</a></p>
</td>
<td class='text' valign='top'>
@@ -663,91 +675,103 @@ <h2 class='stats'>
<p id='t129' class='pln'>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;max:&nbsp;the&nbsp;max&nbsp;amount&nbsp;of&nbsp;columns&nbsp;to&nbsp;return&lt;/li&gt;<span class='strut'>&nbsp;</span></p>
- <p id='t130' class='pln'>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;consistencyLevel:&nbsp;the&nbsp;read&nbsp;consistency&nbsp;level&lt;/li&gt;<span class='strut'>&nbsp;</span></p>
+ <p id='t130' class='pln'>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;columns:&nbsp;an&nbsp;{Array}&nbsp;of&nbsp;column&nbsp;names&nbsp;to&nbsp;get&lt;/li&gt;<span class='strut'>&nbsp;</span></p>
- <p id='t131' class='pln'>&nbsp;*&nbsp;&nbsp;&nbsp;&lt;/ul&gt;<span class='strut'>&nbsp;</span></p>
+ <p id='t131' class='pln'>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;consistencyLevel:&nbsp;the&nbsp;read&nbsp;consistency&nbsp;level&lt;/li&gt;<span class='strut'>&nbsp;</span></p>
- <p id='t132' class='pln'>&nbsp;*&nbsp;@param&nbsp;{Function}&nbsp;callback&nbsp;The&nbsp;callback&nbsp;to&nbsp;invoke&nbsp;once&nbsp;the&nbsp;response&nbsp;has&nbsp;been&nbsp;received<span class='strut'>&nbsp;</span></p>
+ <p id='t132' class='pln'>&nbsp;*&nbsp;&nbsp;&nbsp;&lt;/ul&gt;<span class='strut'>&nbsp;</span></p>
- <p id='t133' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
+ <p id='t133' class='pln'>&nbsp;*&nbsp;@param&nbsp;{Function}&nbsp;callback&nbsp;The&nbsp;callback&nbsp;to&nbsp;invoke&nbsp;once&nbsp;the&nbsp;response&nbsp;has&nbsp;been&nbsp;received<span class='strut'>&nbsp;</span></p>
- <p id='t134' class='stm run'>ColumnFamily.prototype.get&nbsp;=&nbsp;function(key,&nbsp;options,&nbsp;callback){<span class='strut'>&nbsp;</span></p>
+ <p id='t134' class='pln'>&nbsp;*/<span class='strut'>&nbsp;</span></p>
- <p id='t135' class='stm run'>&nbsp;&nbsp;if&nbsp;(typeof&nbsp;options&nbsp;===&nbsp;'function'){<span class='strut'>&nbsp;</span></p>
+ <p id='t135' class='stm run'>ColumnFamily.prototype.get&nbsp;=&nbsp;function(key,&nbsp;options,&nbsp;callback){<span class='strut'>&nbsp;</span></p>
- <p id='t136' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;callback&nbsp;=&nbsp;options;<span class='strut'>&nbsp;</span></p>
+ <p id='t136' class='stm run'>&nbsp;&nbsp;if&nbsp;(typeof&nbsp;options&nbsp;===&nbsp;'function'){<span class='strut'>&nbsp;</span></p>
- <p id='t137' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;options&nbsp;=&nbsp;{};<span class='strut'>&nbsp;</span></p>
+ <p id='t137' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;callback&nbsp;=&nbsp;options;<span class='strut'>&nbsp;</span></p>
- <p id='t138' class='pln'>&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
+ <p id='t138' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;options&nbsp;=&nbsp;{};<span class='strut'>&nbsp;</span></p>
- <p id='t139' class='pln'><span class='strut'>&nbsp;</span></p>
+ <p id='t139' class='pln'>&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
- <p id='t140' class='stm run'>&nbsp;&nbsp;callback&nbsp;=&nbsp;callback&nbsp;||&nbsp;NOOP;<span class='strut'>&nbsp;</span></p>
+ <p id='t140' class='pln'><span class='strut'>&nbsp;</span></p>
- <p id='t141' class='pln'><span class='strut'>&nbsp;</span></p>
+ <p id='t141' class='stm run'>&nbsp;&nbsp;callback&nbsp;=&nbsp;callback&nbsp;||&nbsp;NOOP;<span class='strut'>&nbsp;</span></p>
- <p id='t142' class='stm run'>&nbsp;&nbsp;var&nbsp;consistency&nbsp;=&nbsp;options.consistencyLevel&nbsp;||&nbsp;DEFAULT_READ_CONSISTENCY,<span class='strut'>&nbsp;</span></p>
+ <p id='t142' class='pln'><span class='strut'>&nbsp;</span></p>
- <p id='t143' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self&nbsp;=&nbsp;this,&nbsp;predicate,&nbsp;parent;<span class='strut'>&nbsp;</span></p>
+ <p id='t143' class='stm run'>&nbsp;&nbsp;var&nbsp;consistency&nbsp;=&nbsp;options.consistencyLevel&nbsp;||&nbsp;DEFAULT_READ_CONSISTENCY,<span class='strut'>&nbsp;</span></p>
- <p id='t144' class='pln'><span class='strut'>&nbsp;</span></p>
+ <p id='t144' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self&nbsp;=&nbsp;this,&nbsp;predicate,&nbsp;parent;<span class='strut'>&nbsp;</span></p>
- <p id='t145' class='stm run'>&nbsp;&nbsp;parent&nbsp;=&nbsp;new&nbsp;ttype.ColumnParent({<span class='strut'>&nbsp;</span></p>
+ <p id='t145' class='pln'><span class='strut'>&nbsp;</span></p>
- <p id='t146' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;column_family:&nbsp;this.name<span class='strut'>&nbsp;</span></p>
+ <p id='t146' class='stm run'>&nbsp;&nbsp;parent&nbsp;=&nbsp;new&nbsp;ttype.ColumnParent({<span class='strut'>&nbsp;</span></p>
- <p id='t147' class='pln'>&nbsp;&nbsp;});<span class='strut'>&nbsp;</span></p>
+ <p id='t147' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;column_family:&nbsp;this.name<span class='strut'>&nbsp;</span></p>
- <p id='t148' class='pln'><span class='strut'>&nbsp;</span></p>
+ <p id='t148' class='pln'>&nbsp;&nbsp;});<span class='strut'>&nbsp;</span></p>
- <p id='t149' class='stm run'>&nbsp;&nbsp;predicate&nbsp;=&nbsp;new&nbsp;ttype.SlicePredicate({<span class='strut'>&nbsp;</span></p>
+ <p id='t149' class='pln'><span class='strut'>&nbsp;</span></p>
- <p id='t150' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;slice_range:&nbsp;new&nbsp;ttype.SliceRange({<span class='strut'>&nbsp;</span></p>
+ <p id='t150' class='stm run'>&nbsp;&nbsp;predicate&nbsp;=&nbsp;new&nbsp;ttype.SlicePredicate();<span class='strut'>&nbsp;</span></p>
- <p id='t151' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start:options.start,<span class='strut'>&nbsp;</span></p>
+ <p id='t151' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
- <p id='t152' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;finish:options.end,<span class='strut'>&nbsp;</span></p>
+ <p id='t152' class='stm run'>&nbsp;&nbsp;if(Array.isArray(options.columns)){<span class='strut'>&nbsp;</span></p>
- <p id='t153' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reversed:options.reversed,<span class='strut'>&nbsp;</span></p>
+ <p id='t153' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;predicate.column_names&nbsp;=&nbsp;options.columns;<span class='strut'>&nbsp;</span></p>
- <p id='t154' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;count:options.max<span class='strut'>&nbsp;</span></p>
+ <p id='t154' class='pln'>&nbsp;&nbsp;}&nbsp;else&nbsp;{<span class='strut'>&nbsp;</span></p>
- <p id='t155' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;})<span class='strut'>&nbsp;</span></p>
+ <p id='t155' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;predicate.slice_range&nbsp;=&nbsp;new&nbsp;ttype.SliceRange({<span class='strut'>&nbsp;</span></p>
- <p id='t156' class='pln'>&nbsp;&nbsp;});<span class='strut'>&nbsp;</span></p>
+ <p id='t156' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start:options.start,<span class='strut'>&nbsp;</span></p>
- <p id='t157' class='pln'><span class='strut'>&nbsp;</span></p>
+ <p id='t157' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;finish:options.end,<span class='strut'>&nbsp;</span></p>
- <p id='t158' class='stm run'>&nbsp;&nbsp;function&nbsp;onComplete(err,&nbsp;val){<span class='strut'>&nbsp;</span></p>
+ <p id='t158' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reversed:options.reversed,<span class='strut'>&nbsp;</span></p>
- <p id='t159' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;if(err){<span class='strut'>&nbsp;</span></p>
+ <p id='t159' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;count:options.max<span class='strut'>&nbsp;</span></p>
- <p id='t160' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;callback(err);<span class='strut'>&nbsp;</span></p>
+ <p id='t160' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;});<span class='strut'>&nbsp;</span></p>
- <p id='t161' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;<span class='strut'>&nbsp;</span></p>
+ <p id='t161' class='pln'>&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
- <p id='t162' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
+ <p id='t162' class='pln'>&nbsp;&nbsp;<span class='strut'>&nbsp;</span></p>
<p id='t163' class='pln'><span class='strut'>&nbsp;</span></p>
- <p id='t164' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;callback(null,&nbsp;Row.fromThrift(key,&nbsp;val,&nbsp;self));<span class='strut'>&nbsp;</span></p>
+ <p id='t164' class='stm run'>&nbsp;&nbsp;function&nbsp;onComplete(err,&nbsp;val){<span class='strut'>&nbsp;</span></p>
+
+ <p id='t165' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;if(err){<span class='strut'>&nbsp;</span></p>
+
+ <p id='t166' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;callback(err);<span class='strut'>&nbsp;</span></p>
+
+ <p id='t167' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;<span class='strut'>&nbsp;</span></p>
+
+ <p id='t168' class='pln'>&nbsp;&nbsp;&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
+
+ <p id='t169' class='pln'><span class='strut'>&nbsp;</span></p>
+
+ <p id='t170' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;callback(null,&nbsp;Row.fromThrift(key,&nbsp;val,&nbsp;self));<span class='strut'>&nbsp;</span></p>
- <p id='t165' class='pln'>&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
+ <p id='t171' class='pln'>&nbsp;&nbsp;}<span class='strut'>&nbsp;</span></p>
- <p id='t166' class='pln'><span class='strut'>&nbsp;</span></p>
+ <p id='t172' class='pln'><span class='strut'>&nbsp;</span></p>
- <p id='t167' class='stm run'>&nbsp;&nbsp;var&nbsp;marshalledKey&nbsp;=&nbsp;this.keyMarshaller.serialize(key).toString('binary');<span class='strut'>&nbsp;</span></p>
+ <p id='t173' class='stm run'>&nbsp;&nbsp;var&nbsp;marshalledKey&nbsp;=&nbsp;this.keyMarshaller.serialize(key).toString('binary');<span class='strut'>&nbsp;</span></p>
- <p id='t168' class='pln'><span class='strut'>&nbsp;</span></p>
+ <p id='t174' class='pln'><span class='strut'>&nbsp;</span></p>
- <p id='t169' class='stm run'>&nbsp;&nbsp;this.connection.execute('get_slice',&nbsp;marshalledKey,&nbsp;parent,&nbsp;predicate,&nbsp;consistency,&nbsp;onComplete);<span class='strut'>&nbsp;</span></p>
+ <p id='t175' class='stm run'>&nbsp;&nbsp;this.connection.execute('get_slice',&nbsp;marshalledKey,&nbsp;parent,&nbsp;predicate,&nbsp;consistency,&nbsp;onComplete);<span class='strut'>&nbsp;</span></p>
- <p id='t170' class='pln'>};<span class='strut'>&nbsp;</span></p>
+ <p id='t176' class='pln'>};<span class='strut'>&nbsp;</span></p>
- <p id='t171' class='pln'><span class='strut'>&nbsp;</span></p>
+ <p id='t177' class='pln'><span class='strut'>&nbsp;</span></p>
- <p id='t172' class='stm run'>module.exports&nbsp;=&nbsp;ColumnFamily;<span class='strut'>&nbsp;</span></p>
+ <p id='t178' class='stm run'>module.exports&nbsp;=&nbsp;ColumnFamily;<span class='strut'>&nbsp;</span></p>
</td>
</tr>
View
2  test/coverage/connection.html
@@ -1577,7 +1577,7 @@ <h2 class='stats'>
<p id='t338' class='stm run'>&nbsp;&nbsp;if(options.gzip&nbsp;===&nbsp;true){<span class='strut'>&nbsp;</span></p>
- <p id='t339' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;zlib.deflateRaw(cql,&nbsp;function(err,&nbsp;cqlz){<span class='strut'>&nbsp;</span></p>
+ <p id='t339' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;zlib.deflate(cql,&nbsp;function(err,&nbsp;cqlz){<span class='strut'>&nbsp;</span></p>
<p id='t340' class='stm run'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.execute('execute_cql_query',&nbsp;cqlz,&nbsp;ttype.Compression.GZIP,&nbsp;onReturn);<span class='strut'>&nbsp;</span></p>
View
8 test/coverage/index.html
@@ -17,7 +17,7 @@
<div id='header'>
<div class='content'>
<h1>Coverage report:
- <span class='pc_cov'>91.11%</span>
+ <span class='pc_cov'>91.16%</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>564</td>
+ <td>567</td>
<td>55</td>
- <td class='right'>91.11%</td>
+ <td class='right'>91.16%</td>
</tr>
</tfoot>
<tbody>
@@ -143,7 +143,7 @@
<tr class='file'>
<td class='name left'><a href='column_family.html'>column_family.js</a></td>
- <td>59</td>
+ <td>62</td>
<td>0</td>
<td class='right'>100.00%</td>
View
BIN  test/coverage/keybd_open.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
6 test/coverage/marshal_serializers.html
@@ -493,7 +493,7 @@ <h2 class='stats'>
<p id='t42' class='stm run'>Serializers.encodeBinary&nbsp;=&nbsp;function(val){<span class='strut'>&nbsp;</span></p>
- <p id='t43' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Buffer(val,&nbsp;'binary');<span class='strut'>&nbsp;</span></p>
+ <p id='t43' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Buffer(val.toString(),&nbsp;'binary');<span class='strut'>&nbsp;</span></p>
<p id='t44' class='pln'>};<span class='strut'>&nbsp;</span></p>
@@ -573,7 +573,7 @@ <h2 class='stats'>
<p id='t82' class='stm run'>Serializers.encodeUTF8&nbsp;=&nbsp;function(val){<span class='strut'>&nbsp;</span></p>
- <p id='t83' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Buffer(val,&nbsp;'utf8');<span class='strut'>&nbsp;</span></p>
+ <p id='t83' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Buffer(val.toString(),&nbsp;'utf8');<span class='strut'>&nbsp;</span></p>
<p id='t84' class='pln'>};<span class='strut'>&nbsp;</span></p>
@@ -593,7 +593,7 @@ <h2 class='stats'>
<p id='t92' class='stm run'>Serializers.encodeAscii&nbsp;=&nbsp;function(val){<span class='strut'>&nbsp;</span></p>
- <p id='t93' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Buffer(val,&nbsp;'ascii');<span class='strut'>&nbsp;</span></p>
+ <p id='t93' class='stm run'>&nbsp;&nbsp;return&nbsp;new&nbsp;Buffer(val.toString(),&nbsp;'ascii');<span class='strut'>&nbsp;</span></p>
<p id='t94' class='pln'>};<span class='strut'>&nbsp;</span></p>
View
3  test/helpers/thrift.json
@@ -41,6 +41,9 @@
"max" : 1,
"reversed" : true
},
+ "standard_get_names_options" : {
+ "columns" : ["one","three"]
+ },
"standard_get_options_error" : {
"start" : "a",
"end" : "z",
View
12 test/thrift.js
@@ -153,6 +153,18 @@ module.exports = {
});
},
+ 'test standard cf.get with columns names':function(test, assert){
+ cf_standard.get(config.standard_row_key, config.standard_get_names_options, function(err, row){
+ assert.ifError(err);
+ assert.ok(row instanceof Helenus.Row);
+ assert.ok(row.count === 2);
+ assert.ok(row.key === config.standard_row_key);
+ assert.ok(row.get('one').value === 'a');
+ assert.ok(row.get('three').value === 'c');
+ test.finish();
+ });
+ },
+
'test standard cf.get with error':function(test, assert){
cf_standard.get(config.standard_row_key, config.standard_get_options_error, function(err, row){
assert.ok(err instanceof Error);
Please sign in to comment.
Something went wrong with that request. Please try again.