Skip to content

Commit

Permalink
test: change calls to deprecated util.print()
Browse files Browse the repository at this point in the history
common.print() is just util.print() and as such prints a deprecation
warning. Per docs, update to console.log().

PR-URL: #3083
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Brendan Ashworth <[email protected]>
  • Loading branch information
Trott authored and rvagg committed Sep 30, 2015
1 parent 5ada45b commit 1167171
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/net-fd-passing-receiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ receiver = net.createServer(function(socket) {

/* To signal the test runne we're up and listening */
receiver.on('listening', function() {
common.print('ready');
console.log('ready');
});

receiver.listen(path);
6 changes: 3 additions & 3 deletions test/pummel/test-net-many-clients.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ for (var i = 0; i < bytes; i++) {
var server = net.createServer(function(c) {
console.log('connected');
total_connections++;
common.print('#');
console.log('#');
c.write(body);
c.end();
});
Expand All @@ -32,7 +32,7 @@ function runClient(callback) {
client.setEncoding('utf8');

client.on('connect', function() {
common.print('c');
console.log('c');
client.recved = '';
client.connections += 1;
});
Expand All @@ -51,7 +51,7 @@ function runClient(callback) {
});

client.on('close', function(had_error) {
common.print('.');
console.log('.');
assert.equal(false, had_error);
assert.equal(bytes, client.recved.length);

Expand Down
2 changes: 1 addition & 1 deletion test/pummel/test-net-pause.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ server.on('listening', function() {
var client = net.createConnection(common.PORT);
client.setEncoding('ascii');
client.on('data', function(d) {
common.print(d);
console.log(d);
recv += d;
});

Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-stdout-to-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function test(size, useBuffer, cb) {
fs.unlinkSync(tmpFile);
} catch (e) {}

common.print(size + ' chars to ' + tmpFile + '...');
console.log(size + ' chars to ' + tmpFile + '...');

childProcess.exec(cmd, function(err) {
if (err) throw err;
Expand Down

0 comments on commit 1167171

Please sign in to comment.