Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[fix] Renamed test macros to make sense for more than 2 types of conn…
…ections
  • Loading branch information
jcrugzz authored and indexzero committed Mar 9, 2013
1 parent c38c6fd commit cc07a25
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions test/macros/net.js
Expand Up @@ -78,14 +78,14 @@ exports.shouldSendData = function (options, nested) {
};

//
// ### function shouldSendDataOverBoth (options, nested)
// ### function shouldSendDataOverAll (options, nested)
// #### @options {Options} Options to setup communication
// #### @options.producers {Array} Set of producers to use.
// #### @nested {Object} Vows context to use once communcation is established.
// Does the same as `exports.shouldSendData`, but runs the test over both
// TCP **and** UDP.
// Does the same as `exports.shouldSendData`, but runs the test over
// TCP UNIX **and** UDP.
//
exports.shouldSendDataOverBoth = function (options, nested) {
exports.shouldSendDataOverAll = function (options, nested) {
return {
"TCP": exports.shouldSendData({
type: 'tcp',
Expand Down Expand Up @@ -190,16 +190,16 @@ exports.shouldDuplex = function (options, nested) {
};

//
// ### function shouldDuplexBoth (options, nested)
// ### function shouldDuplexAll (options, nested)
// #### @options {Options} Options to setup full duplex communication
// #### @options.ttl {number} Default Expiry TTL.
// #### @options.reactors {Array} Set of reactors to use.
// #### @options.producers {Array} Set of producers to use.
// #### @nested {Object} Vows context to use once communcation is established.
// Does the same as `exports.shouldDuplex`, but runs the test over both
// TCP **and** UDP.
// Does the same as `exports.shouldDuplex`, but runs the test over
// TCP UNIX **and** UDP.
//
exports.shouldDuplexBoth = function (options, nested) {
exports.shouldDuplexAll = function (options, nested) {
return {
"TCP": exports.shouldDuplex({
type: 'tcp',
Expand Down
2 changes: 1 addition & 1 deletion test/net/client-test.js
Expand Up @@ -13,7 +13,7 @@ var assert = require('assert'),
macros = require('../macros');

vows.describe('godot/net/client').addBatch({
"Godot client": macros.net.shouldSendDataOverBoth(
"Godot client": macros.net.shouldSendDataOverAll(
{
producers: [
godot.producer(helpers.fixtures['producer-test'])
Expand Down
10 changes: 5 additions & 5 deletions test/net/duplex-multiple-test.js
Expand Up @@ -13,7 +13,7 @@ var assert = require('assert'),

vows.describe('godot/net/duplex/multiple').addBatch({
"Godot duplex": {
"tagged": macros.shouldDuplexBoth(
"tagged": macros.shouldDuplexAll(
{
ttl: 200,
reactors: [
Expand All @@ -31,11 +31,11 @@ vows.describe('godot/net/duplex/multiple').addBatch({
var until = 15,
that = this,
taggedStream;

that.data = [];

taggedStream = helpers.net.getStream(this.server, 'tagged')

taggedStream.on('data', function onData(data) {
that.data.push(data);
if (that.data.length > until) {
Expand All @@ -56,4 +56,4 @@ vows.describe('godot/net/duplex/multiple').addBatch({
}
)
}
}).export(module);
}).export(module);
4 changes: 2 additions & 2 deletions test/net/duplex-test.js
Expand Up @@ -13,7 +13,7 @@ var assert = require('assert'),

vows.describe('godot/net/duplex').addBatch({
"Godot duplex": {
"where & where + expire": macros.shouldDuplexBoth(
"where & where + expire": macros.shouldDuplexAll(
{
ttl: 200,
reactors: [
Expand Down Expand Up @@ -60,4 +60,4 @@ vows.describe('godot/net/duplex').addBatch({
}
)
}
}).export(module);
}).export(module);

0 comments on commit cc07a25

Please sign in to comment.