Comparing version 2.2.2 to 2.2.3
{ | ||
"name": "thriftrw", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "thrift encoding/decoding using bufrw", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -51,3 +51,3 @@ // Copyright (c) 2015 Uber Technologies, Inc. | ||
var resultFields = def.throws || []; | ||
if (returnType.type === 'BaseType' && returnType.baseType !== 'void') { | ||
if (returnType.type !== 'BaseType' || returnType.baseType !== 'void') { | ||
var successFieldId = new ast.FieldIdentifier(0); | ||
@@ -54,0 +54,0 @@ var successField = new ast.Field(successFieldId, def.returns, 'success'); |
@@ -50,1 +50,15 @@ // Copyright (c) 2015 Uber Technologies, Inc. | ||
}); | ||
test('returns base-type that is not void', function t(assert) { | ||
var result = thrift.getType('Foo::returnsI32_result'); | ||
assert.deepEqual(Object.keys(result.fieldsById), ['0'], 'success id'); | ||
assert.deepEquals(Object.keys(result.fieldsByName), ['success'], 'success name'); | ||
assert.end(); | ||
}); | ||
test('returns non-base-type', function t(assert) { | ||
var result = thrift.getType('Foo::returnsStruct_result'); | ||
assert.deepEqual(Object.keys(result.fieldsById), ['0'], 'success id'); | ||
assert.deepEquals(Object.keys(result.fieldsByName), ['success'], 'success name'); | ||
assert.end(); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
338228
6085