make rhino happy
This commit is contained in:
parent
35d29af778
commit
59133faa2c
5 changed files with 17 additions and 18 deletions
|
|
@ -49,7 +49,7 @@ assert.range = function(range, startRow, startColumn, endRow, endColumn) {
|
|||
assert.position(range.end, endRow, endColumn);
|
||||
};
|
||||
|
||||
assert["false"] = function(value) {
|
||||
assert.notOk = function(value) {
|
||||
assert.equal(value, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,10 +71,10 @@ var Test = {
|
|||
this.editor.setDocument(this.doc2);
|
||||
|
||||
this.doc1.duplicateLines(0, 0);
|
||||
assert.false(called);
|
||||
assert.notOk(called);
|
||||
|
||||
this.doc2.duplicateLines(0, 0);
|
||||
assert.ok(called);
|
||||
assert.notOk(called);
|
||||
},
|
||||
|
||||
"test: should use cursor of new document" : function() {
|
||||
|
|
@ -100,7 +100,7 @@ var Test = {
|
|||
var called = false;
|
||||
this.doc1.getSelection().moveCursorTo(0, 1);
|
||||
assert.position(this.editor.getCursorPosition(), 0, 0);
|
||||
assert.false(called);
|
||||
assert.notOk(called);
|
||||
|
||||
this.doc2.getSelection().moveCursorTo(1, 1);
|
||||
assert.position(this.editor.getCursorPosition(), 1, 1);
|
||||
|
|
@ -130,7 +130,7 @@ var Test = {
|
|||
var called = false;
|
||||
this.doc1.getSelection().selectTo(0, 1);
|
||||
assert.position(this.editor.getSelection().getSelectionLead(), 0, 0);
|
||||
assert.false(called);
|
||||
assert.notOk(called);
|
||||
|
||||
this.doc2.getSelection().selectTo(1, 1);
|
||||
assert.position(this.editor.getSelection().getSelectionLead(), 1, 1);
|
||||
|
|
@ -146,7 +146,7 @@ var Test = {
|
|||
|
||||
var called = false;
|
||||
this.doc1.setMode(new Text());
|
||||
assert.false(called);
|
||||
assert.notOk(called);
|
||||
|
||||
this.doc2.setMode(new JavaScriptMode());
|
||||
assert.ok(called);
|
||||
|
|
|
|||
|
|
@ -75,12 +75,12 @@ var Test = {
|
|||
assert.ok(range.isEmpty());
|
||||
|
||||
var range = new Range(1, 2, 1, 6);
|
||||
assert.false(range.isEmpty());
|
||||
assert.notOk(range.isEmpty());
|
||||
},
|
||||
|
||||
"test: is multi line": function() {
|
||||
var range = new Range(1, 2, 1, 6);
|
||||
assert.false(range.isMultiLine());
|
||||
assert.notOk(range.isMultiLine());
|
||||
|
||||
var range = new Range(1, 2, 2, 6);
|
||||
assert.ok(range.isMultiLine());
|
||||
|
|
@ -109,9 +109,9 @@ var Test = {
|
|||
assert.ok(range.contains(5, 19));
|
||||
assert.ok(range.contains(5, 20));
|
||||
|
||||
assert.false(range.contains(1, 9));
|
||||
assert.false(range.contains(0, 0));
|
||||
assert.false(range.contains(5, 21));
|
||||
assert.notOk(range.contains(1, 9));
|
||||
assert.notOk(range.contains(0, 0));
|
||||
assert.notOk(range.contains(5, 21));
|
||||
},
|
||||
|
||||
"test: contains for single line ranges": function() {
|
||||
|
|
@ -121,10 +121,10 @@ var Test = {
|
|||
assert.ok(range.contains(1, 15));
|
||||
assert.ok(range.contains(1, 20));
|
||||
|
||||
assert.false(range.contains(0, 9));
|
||||
assert.false(range.contains(2, 9));
|
||||
assert.false(range.contains(1, 9));
|
||||
assert.false(range.contains(1, 21));
|
||||
assert.notOk(range.contains(0, 9));
|
||||
assert.notOk(range.contains(2, 9));
|
||||
assert.notOk(range.contains(1, 9));
|
||||
assert.notOk(range.contains(1, 21));
|
||||
},
|
||||
|
||||
"test: extend range": function() {
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ var Test = {
|
|||
});
|
||||
|
||||
selection.moveCursorTo(0, 5);
|
||||
assert.false(called);
|
||||
assert.notOk(called);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -437,8 +437,7 @@ var Test = {
|
|||
editor.moveCursorTo(1, 8);
|
||||
editor.removeLeft();
|
||||
assert.equal(doc.toString(), "123\n 456");
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = require("async/test").testcase(Test);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue