remove comments; clarify test message

This commit is contained in:
Alan Kligman 2013-12-20 00:45:11 -05:00
parent 53e6293494
commit 7dc0ef6ccb
2 changed files with 11 additions and 14 deletions

View File

@ -1037,7 +1037,6 @@ define(function(require) {
path = normalize(path);
function update_times (error, node) {
//Note: Going by node.js' implementation, utimes works on directories
if (error) {
callback(error);
}
@ -1048,7 +1047,6 @@ define(function(require) {
}
}
//check if atime and mtime are integers and >= 0
if (typeof atime != 'number' || typeof mtime != 'number') {
callback(new EInvalid('atime and mtime must be number'));
}
@ -1073,7 +1071,6 @@ define(function(require) {
}
}
//check if atime and mtime are integers and >= 0
if (typeof atime != 'number' || typeof mtime != 'number') {
callback(new EInvalid('atime and mtime must be a number'));
}
@ -1585,7 +1582,7 @@ define(function(require) {
else {
callback(null);
}
}
}
utimes_file(context, path, atime, mtime, check_result)
}
@ -1611,7 +1608,7 @@ define(function(require) {
callback(new EBadFileDescriptor('descriptor does not permit writing'));
} else {
futimes_file(context, ofd, atime, mtime, check_result);
}
}
}
function _rename(context, oldpath, newpath, callback) {

View File

@ -32,7 +32,7 @@ define(["IDBFS"], function(IDBFS) {
});
});
waitsFor(function () {
waitsFor(function () {
return complete;
}, 'test to complete', DEFAULT_TIMEOUT);
@ -56,7 +56,7 @@ define(["IDBFS"], function(IDBFS) {
});
});
waitsFor(function () {
waitsFor(function () {
return complete;
}, 'test to complete', DEFAULT_TIMEOUT);
@ -80,7 +80,7 @@ define(["IDBFS"], function(IDBFS) {
});
});
waitsFor(function () {
waitsFor(function () {
return complete;
}, 'test to complete', DEFAULT_TIMEOUT);
@ -97,7 +97,7 @@ define(["IDBFS"], function(IDBFS) {
var atime = Date.parse('1 Oct 2000 15:33:22');
var mtime = Date.parse('30 Sep 2000 06:43:54');
that.fs.utimes('/pathdoesnotexist', atime, mtime, function (error) {
_error = error;
complete = true;
@ -127,7 +127,7 @@ define(["IDBFS"], function(IDBFS) {
});
});
waitsFor(function () {
waitsFor(function () {
return complete;
}, 'test to complete', DEFAULT_TIMEOUT);
@ -214,13 +214,13 @@ define(["IDBFS"], function(IDBFS) {
that.fs.futimes(ofd, atime, mtime, function (error) {
_error = error;
that.fs.fstat(ofd, function (error, stat) {
if (error) throw error;
_stat = stat;
complete = true;
});
});
});
});
@ -274,7 +274,7 @@ define(["IDBFS"], function(IDBFS) {
});
});
it ('should update atime and mtime if they are null', function () {
it ('should update atime and mtime using current time if arguments are null', function () {
var complete = false;
var _error;
var that = this;
@ -293,7 +293,7 @@ define(["IDBFS"], function(IDBFS) {
that.fs.stat('/myfile', function (error, stat) {
if (error) throw error;
atimeEst = now - stat.atime;
mtimeEst = now - stat.mtime;
complete = true;