Permalink
Browse files

nctest working on windows

  • Loading branch information...
1 parent b97d466 commit bdca5af4a1526e1d785c12176071b62e9e8cba09 @gatapia committed Jun 10, 2012
View
6 bin/nccompile.js
@@ -24,16 +24,12 @@
* annotation docs</a>.
*/
-// TODO: Since npm link does not work on windows lets just hack this for now.
-// this probably means that npm install will now no longer work.
-var rootLibDir = '../lib/';
-
/**
* @private
* @const
* @type {nclosure.core}
*/
-var ng_ = require(rootLibDir + 'nclosure').nclosure();
+var ng_ = require('../lib/nclosure').nclosure();
goog.provide('nclosure.nccompile');
View
7 bin/ncdoc.js
@@ -15,17 +15,12 @@
* @see <a href='http://jsdoc.sourceforge.net/'>official docs</a>
*/
-
-// TODO: Since npm link does not work on windows lets just hack this for now.
-// this probably means that npm install will now no longer work.
-var rootLibDir = '../lib/';
-
/**
* @private
* @const
* @type {nclosure.core}
*/
-var ng_ = require(rootLibDir + 'nclosure').nclosure();
+var ng_ = require('../lib/nclosure').nclosure();
goog.provide('nclosure.ncdoc');
View
7 bin/ncstyle.js
@@ -30,17 +30,12 @@
* Google's JavaScript Style Guide</a>
*/
-
-// TODO: Since npm link does not work on windows lets just hack this for now.
-// this probably means that npm install will now no longer work.
-var rootLibDir = '../lib/';
-
/**
* @private
* @const
* @type {nclosure.core}
*/
-var ng_ = require(rootLibDir + 'nclosure').nclosure();
+var ng_ = require('../lib/nclosure').nclosure();
goog.provide('nclosure.ncstyle');
View
13 bin/nctest.js
@@ -28,17 +28,12 @@
* @see <a href='http://www.jsunit.net/'>jsunit official docs.</a>
*/
-
-// TODO: Since npm link does not work on windows lets just hack this for now.
-// this probably means that npm install will now no longer work.
-var rootLibDir = '../lib/';
-
/**
* @private
* @const
* @type {nclosure.core}
*/
-var ng_ = require(rootLibDir + 'nclosure').nclosure();
+var ng_ = require('../lib/nclosure').nclosure();
goog.provide('nclosure.nctest');
goog.require('goog.array');
@@ -60,12 +55,14 @@ goog.require('nclosure.core');
* @constructor
*/
nclosure.nctest = function() {
+ var testFiles = this.getAllTestFiles_(process.argv[2]);
+ ng_.debug('nctest - testFiles:', testFiles);
+
/**
* @private
* @type {nclosure.NodeTestsRunner}
*/
- this.tr_ = new nclosure.NodeTestsRunner(
- this.getAllTestFiles_(process.argv[2]), this.getTestArgs_());
+ this.tr_ = new nclosure.NodeTestsRunner(testFiles, this.getTestArgs_());
process.on('uncaughtException', goog.bind(this.onException_, this));
View
28 bin/nodetestinstance.js
@@ -8,27 +8,22 @@
* @author guido@tapia.com.au (Guido Tapia)
*/
-
-// TODO: Since npm link does not work on windows lets just hack this for now.
-// this probably means that npm install will now no longer work.
-var rootLibDir = '../lib/';
-
/**
* @private
* @const
* @type {nclosure.core}
*/
-var ng_ = require(rootLibDir + 'nclosure').nclosure();
-
+var ng_ = require('../lib/nclosure').nclosure();
goog.provide('nclosure.NodeTestInstance');
-
/**
* goog/testing/testcase.js Reads this property as soon as it's 'required' so
* set it now before the goog.requires below
* @type {{userAgent:string}}
*/
global.navigator = { userAgent: 'node.js' };
+window = global;
+
goog.require('goog.testing.AsyncTestCase');
goog.require('goog.testing.TestCase');
@@ -39,8 +34,6 @@ goog.require('node.fs');
goog.require('nclosure.core');
-
-
/**
* @constructor
* @param {string} file The filename holding the test that we will be
@@ -52,7 +45,6 @@ goog.require('nclosure.core');
* nctest command.
*/
nclosure.NodeTestInstance = function(file, args) {
-
/**
* @private
* @type {string}
@@ -89,7 +81,6 @@ nclosure.NodeTestInstance = function(file, args) {
this.overwriteAsyncTestCaseProblemPoints_();
process.on('uncaughtException', goog.bind(this.onTestComplete_, this));
-
this.run();
};
@@ -195,7 +186,8 @@ nclosure.NodeTestInstance.prototype.createAsyncTestCase_ = function() {
* @return {string} The test file contents.
*/
nclosure.NodeTestInstance.prototype.loadTestContents_ = function() {
- return node.fs.readFileSync(this.file_).toString();
+ var contents = node.fs.readFileSync(this.file_).toString();
+ return contents;
};
@@ -209,8 +201,11 @@ nclosure.NodeTestInstance.prototype.loadTestContentsIntoMemory_ =
contents = this.convertHtmlTestToJS_(contents);
}
contents = contents.replace(/^#![^\n]+/, '\n'); // remove shebang
- process.binding('evals').Script.
- runInThisContext(contents, this.shortName_);
+ try {
+ require('vm').runInThisContext(contents, this.shortName_);
+ } catch(ex) {
+ console.log(ex)
+ }
};
@@ -339,5 +334,4 @@ nclosure.NodeTestInstance.stackFramesToString_ = function(frames) {
}
return stack.join('');
};
-
-new nclosure.NodeTestInstance(process.argv[2], process.argv[3]);
+new nclosure.NodeTestInstance(process.argv[2], process.argv[3]);
View
2 bin/nodetestsrunner.js
@@ -66,7 +66,7 @@ nclosure.NodeTestsRunner.prototype.execute = function() {
nclosure.NodeTestsRunner.prototype.runNextTest_ = function() {
if (this.testFiles_.length === 0) {
this.displayResults_();
- } else {
+ } else {
this.runNextTestImpl_(this.testFiles_.pop());
}
};
View
110 examples/animals/deps.js
@@ -1,12 +1,98 @@
-// This file was autogenerated by /home/ubuntu/Dev/projects/nclosure/third_party/closure-library/closure/bin/build/depswriter.py.
-// Please do not edit.
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/animals/cat.js', ['nclosure.examples.animals.Cat'], ['nclosure.examples.animals.CatLike', 'nclosure.examples.animals.IAnimal']);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/animals/catlike.js', ['nclosure.examples.animals.CatLike'], ['nclosure.examples.animals.IAnimal']);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/animals/deps.js', [], []);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/animals/docs/javascript/all.js', [], []);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/animals/docs/javascript/html5.js', [], []);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/animals/dog.js', ['nclosure.examples.animals.Dog'], ['nclosure.examples.animals.IAnimal']);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/animals/example.js', ['nclosure.examples.animals.Example'], ['goog.array', 'nclosure.examples.animals.Cat', 'nclosure.examples.animals.Dog', 'nclosure.examples.animals.IAnimal', 'nclosure.examples.animals.Monkey', 'nclosure.examples.animals.Tiger']);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/animals/ianimal.js', ['nclosure.examples.animals.IAnimal'], []);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/animals/monkey.js', ['nclosure.examples.animals.Monkey'], ['nclosure.examples.animals.IAnimal']);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/animals/tiger.js', ['nclosure.examples.animals.Tiger'], ['nclosure.examples.animals.CatLike', 'nclosure.examples.animals.IAnimal']);
+// This file was autogenerated by C:\dev\projects\nclosure\third_party\closure-library\closure\bin\build\depswriter.py.
+// Please do not edit.
+goog.addDependency('../../../../examples/animals/cat.js', ['nclosure.examples.animals.Cat'], ['nclosure.examples.animals.CatLike', 'nclosure.examples.animals.IAnimal']);
+goog.addDependency('../../../../examples/animals/catlike.js', ['nclosure.examples.animals.CatLike'], ['nclosure.examples.animals.IAnimal']);
+goog.addDependency('../../../../examples/animals/deps.js', [], []);
+goog.addDependency('../../../../examples/animals/docs/javascript/all.js', [], []);
+goog.addDependency('../../../../examples/animals/docs/javascript/html5.js', [], []);
+goog.addDependency('../../../../examples/animals/dog.js', ['nclosure.examples.animals.Dog'], ['nclosure.examples.animals.IAnimal']);
+goog.addDependency('../../../../examples/animals/example.js', ['nclosure.examples.animals.Example'], ['goog.array', 'nclosure.examples.animals.Cat', 'nclosure.examples.animals.Dog', 'nclosure.examples.animals.IAnimal', 'nclosure.examples.animals.Monkey', 'nclosure.examples.animals.Tiger']);
+goog.addDependency('../../../../examples/animals/ianimal.js', ['nclosure.examples.animals.IAnimal'], []);
+goog.addDependency('../../../../examples/animals/monkey.js', ['nclosure.examples.animals.Monkey'], ['nclosure.examples.animals.IAnimal']);
+goog.addDependency('../../../../examples/animals/tiger.js', ['nclosure.examples.animals.Tiger'], ['nclosure.examples.animals.CatLike', 'nclosure.examples.animals.IAnimal']);
+goog.addDependency('../../../../lib/third_party/node/deps.js', [], []);
+goog.addDependency('../../../../lib/third_party/node/docs/javascript/all.js', [], []);
+goog.addDependency('../../../../lib/third_party/node/docs/javascript/html5.js', [], []);
+goog.addDependency('../../../../lib/third_party/node/docs/javascript/prettify.js', [], []);
+goog.addDependency('../../../../lib/third_party/node/node.assert.AssertionError.js', ['node.assert.AssertionError'], []);
+goog.addDependency('../../../../lib/third_party/node/node.assert.js', ['node.assert'], []);
+goog.addDependency('../../../../lib/third_party/node/node.buffer.Buffer.js', ['node.buffer.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.buffer.SlowBuffer.js', ['node.buffer.SlowBuffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.buffer.js', ['node.buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.child_process.js', ['node.child_process'], []);
+goog.addDependency('../../../../lib/third_party/node/node.console.js', ['node.console'], []);
+goog.addDependency('../../../../lib/third_party/node/node.constants.js', ['node.constants'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Cipher.Buffer.js', ['node.crypto.Cipher.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Cipher.js', ['node.crypto.Cipher'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Credentials.js', ['node.crypto.Credentials'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Decipher.Buffer.js', ['node.crypto.Decipher.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Decipher.js', ['node.crypto.Decipher'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Hash.js', ['node.crypto.Hash'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Hmac.Buffer.js', ['node.crypto.Hmac.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Hmac.js', ['node.crypto.Hmac'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Sign.Buffer.js', ['node.crypto.Sign.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Sign.js', ['node.crypto.Sign'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Verify.Buffer.js', ['node.crypto.Verify.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Verify.js', ['node.crypto.Verify'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.js', ['node.crypto'], []);
+goog.addDependency('../../../../lib/third_party/node/node.dgram.Socket.js', ['node.dgram.Socket'], []);
+goog.addDependency('../../../../lib/third_party/node/node.dgram.js', ['node.dgram'], []);
+goog.addDependency('../../../../lib/third_party/node/node.dns.js', ['node.dns'], []);
+goog.addDependency('../../../../lib/third_party/node/node.events.EventEmitter.js', ['node.events.EventEmitter'], []);
+goog.addDependency('../../../../lib/third_party/node/node.events.js', ['node.events'], []);
+goog.addDependency('../../../../lib/third_party/node/node.freelist.FreeList.js', ['node.freelist.FreeList'], []);
+goog.addDependency('../../../../lib/third_party/node/node.freelist.js', ['node.freelist'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.FileReadStream.js', ['node.fs.FileReadStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.FileWriteStream.js', ['node.fs.FileWriteStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.ReadStream.js', ['node.fs.ReadStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.Stats.Buffer.js', ['node.fs.Stats.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.Stats.js', ['node.fs.Stats'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.WriteStream.js', ['node.fs.WriteStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.js', ['node.fs'], ['node.buffer.Buffer', 'node.fs.ReadStream', 'node.fs.Stats', 'node.fs.WriteStream']);
+goog.addDependency('../../../../lib/third_party/node/node.global.Buffer.js', ['node.global.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.global.js', ['node.global'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.Agent.js', ['node.http.Agent'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.Client.js', ['node.http.Client'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.http.ClientRequest.js', ['node.http.ClientRequest'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.IncomingMessage.js', ['node.http.IncomingMessage'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.OutgoingMessage.js', ['node.http.OutgoingMessage'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.Server.js', ['node.http.Server'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.ServerResponse.js', ['node.http.ServerResponse'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.js', ['node.http'], ['node.http.ClientRequest', 'node.http.Server', 'node.http.ServerResponse']);
+goog.addDependency('../../../../lib/third_party/node/node.https.Server.js', ['node.https.Server'], []);
+goog.addDependency('../../../../lib/third_party/node/node.https.js', ['node.https'], []);
+goog.addDependency('../../../../lib/third_party/node/node.js', ['node'], []);
+goog.addDependency('../../../../lib/third_party/node/node.module.js', ['node.module'], []);
+goog.addDependency('../../../../lib/third_party/node/node.net.Server.js', ['node.net.Server'], []);
+goog.addDependency('../../../../lib/third_party/node/node.net.Socket.js', ['node.net.Socket'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.net.Stream.js', ['node.net.Stream'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.net.js', ['node.net'], []);
+goog.addDependency('../../../../lib/third_party/node/node.os.js', ['node.os'], []);
+goog.addDependency('../../../../lib/third_party/node/node.path.js', ['node.path'], []);
+goog.addDependency('../../../../lib/third_party/node/node.process.EventEmitter.Buffer.js', ['node.process.EventEmitter.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.process.EventEmitter.js', ['node.process.EventEmitter'], []);
+goog.addDependency('../../../../lib/third_party/node/node.process.js', ['node.process'], []);
+goog.addDependency('../../../../lib/third_party/node/node.querystring.js', ['node.querystring'], []);
+goog.addDependency('../../../../lib/third_party/node/node.readline.Interface.js', ['node.readline.Interface'], []);
+goog.addDependency('../../../../lib/third_party/node/node.readline.js', ['node.readline'], []);
+goog.addDependency('../../../../lib/third_party/node/node.repl.REPLServer.js', ['node.repl.REPLServer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.repl.js', ['node.repl'], []);
+goog.addDependency('../../../../lib/third_party/node/node.stream.Stream.js', ['node.stream.Stream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.stream.js', ['node.stream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.string_decoder.StringDecoder.js', ['node.string_decoder.StringDecoder'], []);
+goog.addDependency('../../../../lib/third_party/node/node.string_decoder.js', ['node.string_decoder'], []);
+goog.addDependency('../../../../lib/third_party/node/node.sys.js', ['node.sys'], ['node.stream.Stream']);
+goog.addDependency('../../../../lib/third_party/node/node.timers.js', ['node.timers'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tls.Server.js', ['node.tls.Server'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tls.js', ['node.tls'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty.js', ['node.tty'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty_posix.ReadStream.js', ['node.tty_posix.ReadStream'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.tty_posix.WriteStream.js', ['node.tty_posix.WriteStream'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.tty_posix.js', ['node.tty_posix'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty_win32.ReadStream.js', ['node.tty_win32.ReadStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty_win32.WriteStream.js', ['node.tty_win32.WriteStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty_win32.js', ['node.tty_win32'], []);
+goog.addDependency('../../../../lib/third_party/node/node.url.js', ['node.url'], []);
+goog.addDependency('../../../../lib/third_party/node/node.util.js', ['node.util'], ['node.stream.Stream']);
+goog.addDependency('../../../../lib/third_party/node/node.vm.Script.js', ['node.vm.Script'], []);
+goog.addDependency('../../../../lib/third_party/node/node.vm.js', ['node.vm'], []);
View
95 examples/external_lib/deps.js
@@ -1,5 +1,90 @@
-// This file was autogenerated by ../picnet-closure-repo/lib/closure-library/closure/bin/build/depswriter.py.
-// Please do not edit.
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/external_lib/Utils.js', ['nclosure.external.Utils'], []);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/external_lib/Utils.min.js', [], []);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/external_lib/deps.js', [], []);
+// This file was autogenerated by C:\dev\projects\nclosure\third_party\closure-library\closure\bin\build\depswriter.py.
+// Please do not edit.
+goog.addDependency('../../../../examples/external_lib/Utils.js', ['nclosure.external.Utils'], []);
+goog.addDependency('../../../../examples/external_lib/deps.js', [], []);
+goog.addDependency('../../../../lib/third_party/node/deps.js', [], []);
+goog.addDependency('../../../../lib/third_party/node/docs/javascript/all.js', [], []);
+goog.addDependency('../../../../lib/third_party/node/docs/javascript/html5.js', [], []);
+goog.addDependency('../../../../lib/third_party/node/docs/javascript/prettify.js', [], []);
+goog.addDependency('../../../../lib/third_party/node/node.assert.AssertionError.js', ['node.assert.AssertionError'], []);
+goog.addDependency('../../../../lib/third_party/node/node.assert.js', ['node.assert'], []);
+goog.addDependency('../../../../lib/third_party/node/node.buffer.Buffer.js', ['node.buffer.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.buffer.SlowBuffer.js', ['node.buffer.SlowBuffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.buffer.js', ['node.buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.child_process.js', ['node.child_process'], []);
+goog.addDependency('../../../../lib/third_party/node/node.console.js', ['node.console'], []);
+goog.addDependency('../../../../lib/third_party/node/node.constants.js', ['node.constants'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Cipher.Buffer.js', ['node.crypto.Cipher.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Cipher.js', ['node.crypto.Cipher'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Credentials.js', ['node.crypto.Credentials'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Decipher.Buffer.js', ['node.crypto.Decipher.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Decipher.js', ['node.crypto.Decipher'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Hash.js', ['node.crypto.Hash'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Hmac.Buffer.js', ['node.crypto.Hmac.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Hmac.js', ['node.crypto.Hmac'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Sign.Buffer.js', ['node.crypto.Sign.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Sign.js', ['node.crypto.Sign'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Verify.Buffer.js', ['node.crypto.Verify.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Verify.js', ['node.crypto.Verify'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.js', ['node.crypto'], []);
+goog.addDependency('../../../../lib/third_party/node/node.dgram.Socket.js', ['node.dgram.Socket'], []);
+goog.addDependency('../../../../lib/third_party/node/node.dgram.js', ['node.dgram'], []);
+goog.addDependency('../../../../lib/third_party/node/node.dns.js', ['node.dns'], []);
+goog.addDependency('../../../../lib/third_party/node/node.events.EventEmitter.js', ['node.events.EventEmitter'], []);
+goog.addDependency('../../../../lib/third_party/node/node.events.js', ['node.events'], []);
+goog.addDependency('../../../../lib/third_party/node/node.freelist.FreeList.js', ['node.freelist.FreeList'], []);
+goog.addDependency('../../../../lib/third_party/node/node.freelist.js', ['node.freelist'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.FileReadStream.js', ['node.fs.FileReadStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.FileWriteStream.js', ['node.fs.FileWriteStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.ReadStream.js', ['node.fs.ReadStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.Stats.Buffer.js', ['node.fs.Stats.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.Stats.js', ['node.fs.Stats'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.WriteStream.js', ['node.fs.WriteStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.js', ['node.fs'], ['node.buffer.Buffer', 'node.fs.ReadStream', 'node.fs.Stats', 'node.fs.WriteStream']);
+goog.addDependency('../../../../lib/third_party/node/node.global.Buffer.js', ['node.global.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.global.js', ['node.global'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.Agent.js', ['node.http.Agent'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.Client.js', ['node.http.Client'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.http.ClientRequest.js', ['node.http.ClientRequest'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.IncomingMessage.js', ['node.http.IncomingMessage'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.OutgoingMessage.js', ['node.http.OutgoingMessage'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.Server.js', ['node.http.Server'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.ServerResponse.js', ['node.http.ServerResponse'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.js', ['node.http'], ['node.http.ClientRequest', 'node.http.Server', 'node.http.ServerResponse']);
+goog.addDependency('../../../../lib/third_party/node/node.https.Server.js', ['node.https.Server'], []);
+goog.addDependency('../../../../lib/third_party/node/node.https.js', ['node.https'], []);
+goog.addDependency('../../../../lib/third_party/node/node.js', ['node'], []);
+goog.addDependency('../../../../lib/third_party/node/node.module.js', ['node.module'], []);
+goog.addDependency('../../../../lib/third_party/node/node.net.Server.js', ['node.net.Server'], []);
+goog.addDependency('../../../../lib/third_party/node/node.net.Socket.js', ['node.net.Socket'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.net.Stream.js', ['node.net.Stream'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.net.js', ['node.net'], []);
+goog.addDependency('../../../../lib/third_party/node/node.os.js', ['node.os'], []);
+goog.addDependency('../../../../lib/third_party/node/node.path.js', ['node.path'], []);
+goog.addDependency('../../../../lib/third_party/node/node.process.EventEmitter.Buffer.js', ['node.process.EventEmitter.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.process.EventEmitter.js', ['node.process.EventEmitter'], []);
+goog.addDependency('../../../../lib/third_party/node/node.process.js', ['node.process'], []);
+goog.addDependency('../../../../lib/third_party/node/node.querystring.js', ['node.querystring'], []);
+goog.addDependency('../../../../lib/third_party/node/node.readline.Interface.js', ['node.readline.Interface'], []);
+goog.addDependency('../../../../lib/third_party/node/node.readline.js', ['node.readline'], []);
+goog.addDependency('../../../../lib/third_party/node/node.repl.REPLServer.js', ['node.repl.REPLServer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.repl.js', ['node.repl'], []);
+goog.addDependency('../../../../lib/third_party/node/node.stream.Stream.js', ['node.stream.Stream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.stream.js', ['node.stream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.string_decoder.StringDecoder.js', ['node.string_decoder.StringDecoder'], []);
+goog.addDependency('../../../../lib/third_party/node/node.string_decoder.js', ['node.string_decoder'], []);
+goog.addDependency('../../../../lib/third_party/node/node.sys.js', ['node.sys'], ['node.stream.Stream']);
+goog.addDependency('../../../../lib/third_party/node/node.timers.js', ['node.timers'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tls.Server.js', ['node.tls.Server'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tls.js', ['node.tls'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty.js', ['node.tty'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty_posix.ReadStream.js', ['node.tty_posix.ReadStream'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.tty_posix.WriteStream.js', ['node.tty_posix.WriteStream'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.tty_posix.js', ['node.tty_posix'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty_win32.ReadStream.js', ['node.tty_win32.ReadStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty_win32.WriteStream.js', ['node.tty_win32.WriteStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty_win32.js', ['node.tty_win32'], []);
+goog.addDependency('../../../../lib/third_party/node/node.url.js', ['node.url'], []);
+goog.addDependency('../../../../lib/third_party/node/node.util.js', ['node.util'], ['node.stream.Stream']);
+goog.addDependency('../../../../lib/third_party/node/node.vm.Script.js', ['node.vm.Script'], []);
+goog.addDependency('../../../../lib/third_party/node/node.vm.js', ['node.vm'], []);
View
109 examples/simple/deps.js
@@ -1,10 +1,99 @@
-// This file was autogenerated by /home/ubuntu/Dev/projects/nclosure/third_party/closure-library/closure/bin/build/depswriter.py.
-// Please do not edit.
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/external_lib/Utils.js', ['nclosure.external.Utils'], []);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/external_lib/deps.js', [], []);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/simple/deps.js', [], []);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/simple/docs/javascript/all.js', [], []);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/simple/docs/javascript/html5.js', [], []);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/simple/example.js', ['nclosure.examples.simple.Example'], ['goog.async.Delay', 'goog.structs.Trie', 'nclosure.external.Utils']);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/simple/tests/async/asyncTests.js', ['nclosure.examples.simple.tests.asyncTests'], ['goog.testing.AsyncTestCase', 'goog.testing.jsunit', 'nclosure.examples.simple.Example']);
-goog.addDependency('/home/ubuntu/Dev/projects/nclosure/examples/simple/tests/syncTests.js', ['nclosure.examples.simple.tests.syncTests'], ['goog.testing.jsunit', 'nclosure.examples.simple.Example']);
+// This file was autogenerated by C:\dev\projects\nclosure\third_party\closure-library\closure\bin\build\depswriter.py.
+// Please do not edit.
+goog.addDependency('../../../../examples/external_lib/Utils.js', ['nclosure.external.Utils'], []);
+goog.addDependency('../../../../examples/external_lib/deps.js', [], []);
+goog.addDependency('../../../../examples/simple/deps.js', [], []);
+goog.addDependency('../../../../examples/simple/docs/javascript/all.js', [], []);
+goog.addDependency('../../../../examples/simple/docs/javascript/html5.js', [], []);
+goog.addDependency('../../../../examples/simple/docs/javascript/prettify.js', [], []);
+goog.addDependency('../../../../examples/simple/example.js', ['nclosure.examples.simple.Example'], ['goog.async.Delay', 'goog.structs.Trie', 'nclosure.external.Utils']);
+goog.addDependency('../../../../examples/simple/tests/async/asyncTests.js', ['nclosure.examples.simple.tests.asyncTests'], ['goog.testing.AsyncTestCase', 'goog.testing.jsunit', 'nclosure.examples.simple.Example']);
+goog.addDependency('../../../../examples/simple/tests/async/deps.js', [], []);
+goog.addDependency('../../../../examples/simple/tests/deps.js', [], []);
+goog.addDependency('../../../../examples/simple/tests/syncTests.js', ['nclosure.examples.simple.tests.syncTests'], ['goog.testing.jsunit', 'nclosure.examples.simple.Example']);
+goog.addDependency('../../../../lib/third_party/node/deps.js', [], []);
+goog.addDependency('../../../../lib/third_party/node/docs/javascript/all.js', [], []);
+goog.addDependency('../../../../lib/third_party/node/docs/javascript/html5.js', [], []);
+goog.addDependency('../../../../lib/third_party/node/docs/javascript/prettify.js', [], []);
+goog.addDependency('../../../../lib/third_party/node/node.assert.AssertionError.js', ['node.assert.AssertionError'], []);
+goog.addDependency('../../../../lib/third_party/node/node.assert.js', ['node.assert'], []);
+goog.addDependency('../../../../lib/third_party/node/node.buffer.Buffer.js', ['node.buffer.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.buffer.SlowBuffer.js', ['node.buffer.SlowBuffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.buffer.js', ['node.buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.child_process.js', ['node.child_process'], []);
+goog.addDependency('../../../../lib/third_party/node/node.console.js', ['node.console'], []);
+goog.addDependency('../../../../lib/third_party/node/node.constants.js', ['node.constants'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Cipher.Buffer.js', ['node.crypto.Cipher.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Cipher.js', ['node.crypto.Cipher'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Credentials.js', ['node.crypto.Credentials'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Decipher.Buffer.js', ['node.crypto.Decipher.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Decipher.js', ['node.crypto.Decipher'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Hash.js', ['node.crypto.Hash'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Hmac.Buffer.js', ['node.crypto.Hmac.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Hmac.js', ['node.crypto.Hmac'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Sign.Buffer.js', ['node.crypto.Sign.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Sign.js', ['node.crypto.Sign'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Verify.Buffer.js', ['node.crypto.Verify.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.Verify.js', ['node.crypto.Verify'], []);
+goog.addDependency('../../../../lib/third_party/node/node.crypto.js', ['node.crypto'], []);
+goog.addDependency('../../../../lib/third_party/node/node.dgram.Socket.js', ['node.dgram.Socket'], []);
+goog.addDependency('../../../../lib/third_party/node/node.dgram.js', ['node.dgram'], []);
+goog.addDependency('../../../../lib/third_party/node/node.dns.js', ['node.dns'], []);
+goog.addDependency('../../../../lib/third_party/node/node.events.EventEmitter.js', ['node.events.EventEmitter'], []);
+goog.addDependency('../../../../lib/third_party/node/node.events.js', ['node.events'], []);
+goog.addDependency('../../../../lib/third_party/node/node.freelist.FreeList.js', ['node.freelist.FreeList'], []);
+goog.addDependency('../../../../lib/third_party/node/node.freelist.js', ['node.freelist'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.FileReadStream.js', ['node.fs.FileReadStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.FileWriteStream.js', ['node.fs.FileWriteStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.ReadStream.js', ['node.fs.ReadStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.Stats.Buffer.js', ['node.fs.Stats.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.Stats.js', ['node.fs.Stats'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.WriteStream.js', ['node.fs.WriteStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.fs.js', ['node.fs'], ['node.buffer.Buffer', 'node.fs.ReadStream', 'node.fs.Stats', 'node.fs.WriteStream']);
+goog.addDependency('../../../../lib/third_party/node/node.global.Buffer.js', ['node.global.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.global.js', ['node.global'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.Agent.js', ['node.http.Agent'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.Client.js', ['node.http.Client'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.http.ClientRequest.js', ['node.http.ClientRequest'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.IncomingMessage.js', ['node.http.IncomingMessage'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.OutgoingMessage.js', ['node.http.OutgoingMessage'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.Server.js', ['node.http.Server'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.ServerResponse.js', ['node.http.ServerResponse'], []);
+goog.addDependency('../../../../lib/third_party/node/node.http.js', ['node.http'], ['node.http.ClientRequest', 'node.http.Server', 'node.http.ServerResponse']);
+goog.addDependency('../../../../lib/third_party/node/node.https.Server.js', ['node.https.Server'], []);
+goog.addDependency('../../../../lib/third_party/node/node.https.js', ['node.https'], []);
+goog.addDependency('../../../../lib/third_party/node/node.js', ['node'], []);
+goog.addDependency('../../../../lib/third_party/node/node.module.js', ['node.module'], []);
+goog.addDependency('../../../../lib/third_party/node/node.net.Server.js', ['node.net.Server'], []);
+goog.addDependency('../../../../lib/third_party/node/node.net.Socket.js', ['node.net.Socket'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.net.Stream.js', ['node.net.Stream'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.net.js', ['node.net'], []);
+goog.addDependency('../../../../lib/third_party/node/node.os.js', ['node.os'], []);
+goog.addDependency('../../../../lib/third_party/node/node.path.js', ['node.path'], []);
+goog.addDependency('../../../../lib/third_party/node/node.process.EventEmitter.Buffer.js', ['node.process.EventEmitter.Buffer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.process.EventEmitter.js', ['node.process.EventEmitter'], []);
+goog.addDependency('../../../../lib/third_party/node/node.process.js', ['node.process'], []);
+goog.addDependency('../../../../lib/third_party/node/node.querystring.js', ['node.querystring'], []);
+goog.addDependency('../../../../lib/third_party/node/node.readline.Interface.js', ['node.readline.Interface'], []);
+goog.addDependency('../../../../lib/third_party/node/node.readline.js', ['node.readline'], []);
+goog.addDependency('../../../../lib/third_party/node/node.repl.REPLServer.js', ['node.repl.REPLServer'], []);
+goog.addDependency('../../../../lib/third_party/node/node.repl.js', ['node.repl'], []);
+goog.addDependency('../../../../lib/third_party/node/node.stream.Stream.js', ['node.stream.Stream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.stream.js', ['node.stream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.string_decoder.StringDecoder.js', ['node.string_decoder.StringDecoder'], []);
+goog.addDependency('../../../../lib/third_party/node/node.string_decoder.js', ['node.string_decoder'], []);
+goog.addDependency('../../../../lib/third_party/node/node.sys.js', ['node.sys'], ['node.stream.Stream']);
+goog.addDependency('../../../../lib/third_party/node/node.timers.js', ['node.timers'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tls.Server.js', ['node.tls.Server'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tls.js', ['node.tls'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty.js', ['node.tty'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty_posix.ReadStream.js', ['node.tty_posix.ReadStream'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.tty_posix.WriteStream.js', ['node.tty_posix.WriteStream'], ['node.buffer.Buffer']);
+goog.addDependency('../../../../lib/third_party/node/node.tty_posix.js', ['node.tty_posix'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty_win32.ReadStream.js', ['node.tty_win32.ReadStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty_win32.WriteStream.js', ['node.tty_win32.WriteStream'], []);
+goog.addDependency('../../../../lib/third_party/node/node.tty_win32.js', ['node.tty_win32'], []);
+goog.addDependency('../../../../lib/third_party/node/node.url.js', ['node.url'], []);
+goog.addDependency('../../../../lib/third_party/node/node.util.js', ['node.util'], ['node.stream.Stream']);
+goog.addDependency('../../../../lib/third_party/node/node.vm.Script.js', ['node.vm.Script'], []);
+goog.addDependency('../../../../lib/third_party/node/node.vm.js', ['node.vm'], []);
View
2 examples/simple/example.js
@@ -53,7 +53,7 @@
* Does not require an opts parameter as we are providing all the options in
* the closure.json file in this directory;
*/
-require('nclosure').nclosure();
+require('../lib/nclosure').nclosure();
/*
* Now that the nclosure is initialised you can use any base.js functionality
View
2 examples/simple/tests/async/asyncTests.js
@@ -1,6 +1,6 @@
#!/usr/bin/env node
-require('nclosure').nclosure();
+require('../lib/nclosure').nclosure();
goog.require('goog.testing.AsyncTestCase');
goog.require('goog.testing.jsunit');
View
2 examples/simple/tests/syncTests.js
@@ -1,6 +1,6 @@
#!/usr/bin/env node
-require('../../../lib/nclosure').nclosure();
+require('../lib/nclosure').nclosure();
goog.require('goog.testing.jsunit');
goog.require('nclosure.examples.simple.Example');
View
15 lib/nclosure.js
@@ -62,6 +62,13 @@ nclosure.core = function() {
/**
* @private
+ * @const
+ * @type {boolean}
+ */
+ this.DEBUG_ = true;
+
+ /**
+ * @private
* @type {nclosure.settingsLoader}
*/
this.settingsLoader_ = /** @type {nclosure.settingsLoader} */
@@ -207,6 +214,14 @@ nclosure.core.prototype.loadAditionalDependenciesInSettings_ = function(opts) {
*/
nclosure.core.prototype.setCurrentContext = function(ctx) { this.ctx_ = ctx; };
+/**
+ * Prints a debug message if this.DEBUG_ is set to true.
+ * @param {*...} var_args Arguments to pass to the console.log command.
+ */
+nclosure.core.prototype.debug = function(var_args) {
+ if (!this.DEBUG_) return;
+ console.log.apply(console, arguments);
+}
////////////////////////////////////////////////////////////////////////////////
// Shadow nclosurebase.js closureScriptLoading and closureScriptLoaded
View
1 third_party/closure-library/closure/goog/testing/asynctestcase.js
@@ -615,7 +615,6 @@ goog.testing.AsyncTestCase.prototype.startTimeoutTimer_ = function() {
this.timeoutHandle_ = this.timeout(goog.bind(function() {
this.dbgLog_('Timeout timer fired with id ' + this.timeoutHandle_);
this.timeoutHandle_ = null;
-
this.doTopOfStackAsyncError_('Timed out while waiting for ' +
'continueTesting() to be called.');
}, this, null), this.stepTimeout);

0 comments on commit bdca5af

Please sign in to comment.