Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Remove tests relying on !process.features.uv
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Oct 11, 2011
1 parent c8dbaf5 commit 9631e29
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 144 deletions.
13 changes: 5 additions & 8 deletions test/internet/test-dns.js
Expand Up @@ -24,8 +24,7 @@ var assert = require('assert'),
net = require('net_uv'),
isIP = net.isIP,
isIPv4 = net.isIPv4,
isIPv6 = net.isIPv6,
uv = process.features.uv;
isIPv6 = net.isIPv6;

var expected = 0,
completed = 0,
Expand Down Expand Up @@ -59,16 +58,14 @@ function TEST(f) {


process.on('exit', function() {
console.log(completed + ' tests completed (using libuv: ' + (!!uv) + ')');
console.log(completed + ' tests completed');
assert.equal(running, false);
assert.strictEqual(expected, completed);
});


function checkWrap(req) {
if (uv) {
assert.ok(typeof req === 'object');
}
assert.ok(typeof req === 'object');
}


Expand Down Expand Up @@ -154,7 +151,7 @@ TEST(function test_reverse_bogus(done) {
}

assert.ok(error instanceof Error);
uv && assert.strictEqual(error.errno, 'ENOTIMP');
assert.strictEqual(error.errno, 'ENOTIMP');

done();
});
Expand Down Expand Up @@ -316,7 +313,7 @@ TEST(function test_lookup_failure(done) {
var req = dns.lookup('does.not.exist', 4, function(err, ip, family) {
assert.ok(err instanceof Error);
assert.strictEqual(err.errno, dns.NOTFOUND);
uv && assert.strictEqual(err.errno, 'ENOTFOUND');
assert.strictEqual(err.errno, 'ENOTFOUND');

done();
});
Expand Down
85 changes: 0 additions & 85 deletions test/simple/test-child-process-deprecated-api.js

This file was deleted.

85 changes: 34 additions & 51 deletions test/simple/test-module-load-list.js
Expand Up @@ -64,60 +64,43 @@ checkExpected();
console.log('load console.log. process.stdout._type is ' +
process.stdout._type);

if (!process.features.uv) {
// legacy
expected = expected.concat([
'NativeModule console',
'NativeModule net_legacy',
'NativeModule timers_legacy',
'Binding timer',
'NativeModule _linklist',
'Binding net',
'NativeModule freelist',
'Binding io_watcher',
'NativeModule tty',
'NativeModule tty_posix',
'NativeModule readline'
]);
} else {
switch (process.stdout._type) {
case 'fs':
expected = expected.concat([
'NativeModule console',
'Binding stdio',
'Binding tty_wrap'
]);
break;
switch (process.stdout._type) {
case 'fs':
expected = expected.concat([
'NativeModule console',
'Binding stdio',
'Binding tty_wrap'
]);
break;

case 'tty':
expected = expected.concat([
'NativeModule console',
'Binding stdio',
'Binding tty_wrap',
'NativeModule tty_uv',
'NativeModule net_uv',
'NativeModule timers_uv',
'Binding timer_wrap',
'NativeModule _linklist'
]);
break;
case 'tty':
expected = expected.concat([
'NativeModule console',
'Binding stdio',
'Binding tty_wrap',
'NativeModule tty_uv',
'NativeModule net_uv',
'NativeModule timers_uv',
'Binding timer_wrap',
'NativeModule _linklist'
]);
break;

case 'pipe':
expected = expected.concat([
'NativeModule console',
'Binding stdio',
'Binding tty_wrap',
'NativeModule net_uv',
'NativeModule timers_uv',
'Binding timer_wrap',
'NativeModule _linklist',
'Binding pipe_wrap'
]);
break;
case 'pipe':
expected = expected.concat([
'NativeModule console',
'Binding stdio',
'Binding tty_wrap',
'NativeModule net_uv',
'NativeModule timers_uv',
'Binding timer_wrap',
'NativeModule _linklist',
'Binding pipe_wrap'
]);
break;

default:
assert.ok(0, 'prcoess.stdout._type is bad');
}
default:
assert.ok(0, 'prcoess.stdout._type is bad');
}

console.error('process.moduleLoadList', process.moduleLoadList);
Expand Down

0 comments on commit 9631e29

Please sign in to comment.