Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpvar committed Apr 6, 2010
1 parent 286397c commit c0bbd21
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
7 changes: 5 additions & 2 deletions lib/carena.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ var carena =
_id = nodeId++;

var dirty = function() {
if (_self.parent && _self.parent !== _self) {
_self.parent.dirty = true;
}
_dirty = true;
};

Expand Down Expand Up @@ -90,7 +93,7 @@ var carena =
});

_self.__defineGetter__('dirty', function() { return _dirty; });

_self.__defineSetter__('dirty', dirty);
_self.add = function(child) {
// parent call needs to make dirty.
child.parent = _self;
Expand Down Expand Up @@ -124,7 +127,7 @@ var carena =

node.prototype = {};

ret = { node : node};
var ret = { node : node};
if (isNode) {
exports.carena = ret;
}
Expand Down
3 changes: 1 addition & 2 deletions test/node.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var carena = require("../lib/carena");
var sys = require("sys");

var carena = require("../lib/carena").carena;

var tests = [], pass = 0, fail = 0;
var ok = function(logic, failmsg)
Expand Down
7 changes: 2 additions & 5 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ import os
VERSION = '0.0.1'

def test(ctx):
out = os.popen('node test/node.js').read();
fp = open("test/status.json", "w+");
fp.write(out);
fp.close();

print os.popen('node test/node.js').read();

0 comments on commit c0bbd21

Please sign in to comment.