<commit_before>var test = require('tape');
var createClient = require('./net-oce-protocol');
var through = require('through');

var Response = createClient.NetOCE_Response;

var getResponseArray = require('./response');

var inspectResponse = createClient.response.encode({"seq":1,"id":0,"value":[{"type":16,"double_value":0,"float_value":0,"int32_value":0,"int64_value":0,"uint32_value":0,"uint64_value":0,"sint32_value":0,"sint64_value":0,"fixed32_value":0,"fixed64_value":null,"sfixed32_value":0,"sfixed64_value":null,"bool_value":false,"string_value":"","bytes_value":null,"operation":{"id":1,"name":"cube","arguments":"double, double, double, double, double, double"}},{"type":16,"double_value":0,"float_value":0,"int32_value":0,"int64_value":0,"uint32_value":0,"uint64_value":0,"sint32_value":0,"sint64_value":0,"fixed32_value":0,"fixed64_value":null,"sfixed32_value":0,"sfixed64_value":null,"bool_value":false,"string_value":"","bytes_value":null,"operation":{"id":2,"name":"export_stl","arguments":"string, handle.."}},{"type":16,"double_value":0,"float_value":0,"int32_value":0,"int64_value":0,"uint32_value":0,"uint64_value":0,"sint32_value":0,"sint64_value":0,"fixed32_value":0,"fixed64_value":null,"sfixed32_value":0,"sfixed64_value":null,"bool_value":false,"string_value":"","bytes_value":null,"operation":{"id":3,"name":"op_cut","arguments":"handle, handle"}},{"type":16,"double_value":0,"float_value":0,"int32_value":0,"int64_value":0,"uint32_value":0,"uint64_value":0,"sint32_value":0,"sint64_value":0,"fixed32_value":0,"fixed64_value":null,"sfixed32_value":0,"sfixed64_value":null,"bool_value":false,"string_value":"","bytes_value":null,"operation":{"id":4,"name":"op_union","arguments":"handle, handle.."}},{"type":16,"double_value":0,"float_value":0,"int32_value":0,"int64_value":0,"uint32_value":0,"uint64_value":0,"sint32_value":0,"sint64_value":0,"fixed32_value":0,"fixed64_value":null,"sfixed32_value":0,"sfixed64_value":null,"bool_value":false,"string_value":"","bytes_value":null,"operation":{"id":5,"name":"reset","arguments":""}}]});

test('double response', function(t) {
  getResponseArray({
    value : [{
      type: 1, // DOUBLE
      double_value: 0.1
    }]
  }, function(e, response) {
    t.equal(response, 0.1);
    t.end();
  });
});

test('boolean response', function(t) {
  getResponseArray({<commit_msg>remove unused / invalid Response line<commit_after>var test = require('tape');
var createClient = require('./net-oce-protocol');
var through = require('through');

var getResponseArray = require('./response');

var inspectResponse = createClient.response.encode({"seq":1,"id":0,"value":[{"type":16,"double_value":0,"float_value":0,"int32_value":0,"int64_value":0,"uint32_value":0,"uint64_value":0,"sint32_value":0,"sint64_value":0,"fixed32_value":0,"fixed64_value":null,"sfixed32_value":0,"sfixed64_value":null,"bool_value":false,"string_value":"","bytes_value":null,"operation":{"id":1,"name":"cube","arguments":"double, double, double, double, double, double"}},{"type":16,"double_value":0,"float_value":0,"int32_value":0,"int64_value":0,"uint32_value":0,"uint64_value":0,"sint32_value":0,"sint64_value":0,"fixed32_value":0,"fixed64_value":null,"sfixed32_value":0,"sfixed64_value":null,"bool_value":false,"string_value":"","bytes_value":null,"operation":{"id":2,"name":"export_stl","arguments":"string, handle.."}},{"type":16,"double_value":0,"float_value":0,"int32_value":0,"int64_value":0,"uint32_value":0,"uint64_value":0,"sint32_value":0,"sint64_value":0,"fixed32_value":0,"fixed64_value":null,"sfixed32_value":0,"sfixed64_value":null,"bool_value":false,"string_value":"","bytes_value":null,"operation":{"id":3,"name":"op_cut","arguments":"handle, handle"}},{"type":16,"double_value":0,"float_value":0,"int32_value":0,"int64_value":0,"uint32_value":0,"uint64_value":0,"sint32_value":0,"sint64_value":0,"fixed32_value":0,"fixed64_value":null,"sfixed32_value":0,"sfixed64_value":null,"bool_value":false,"string_value":"","bytes_value":null,"operation":{"id":4,"name":"op_union","arguments":"handle, handle.."}},{"type":16,"double_value":0,"float_value":0,"int32_value":0,"int64_value":0,"uint32_value":0,"uint64_value":0,"sint32_value":0,"sint64_value":0,"fixed32_value":0,"fixed64_value":null,"sfixed32_value":0,"sfixed64_value":null,"bool_value":false,"string_value":"","bytes_value":null,"operation":{"id":5,"name":"reset","arguments":""}}]});

test('double response', function(t) {
  getResponseArray({
    value : [{
      type: 1, // DOUBLE
      double_value: 0.1
    }]
  }, function(e, response) {
    t.equal(response, 0.1);
    t.end();
  });
});

test('boolean response', function(t) {
  getResponseArray({
{'fraction_non_alphanumeric': 0.2413201885983712, 'fraction_numerical': 0.07372481783111873, 'mean_word_length': 18.365145228215766, 'pattern_counts': {'":': 206, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3641313', 'n_tokens_mistral': 1770, 'n_tokens_neox': 1635, 'n_words': 90}