can't use true as property name with "."
This commit is contained in:
parent
7b10636444
commit
c73e2c1c8d
7 changed files with 21 additions and 25 deletions
|
|
@ -49,11 +49,7 @@ assert.range = function(range, startRow, startColumn, endRow, endColumn) {
|
|||
assert.position(range.end, endRow, endColumn);
|
||||
};
|
||||
|
||||
assert.true = function(value) {
|
||||
assert.equal(value, true);
|
||||
}
|
||||
|
||||
assert.false = function(value) {
|
||||
assert["false"] = function(value) {
|
||||
assert.equal(value, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ var Test = {
|
|||
assert.false(called);
|
||||
|
||||
this.doc2.duplicateLines(0, 0);
|
||||
assert.true(called);
|
||||
assert.ok(called);
|
||||
},
|
||||
|
||||
"test: should use cursor of new document" : function() {
|
||||
|
|
@ -104,7 +104,7 @@ var Test = {
|
|||
|
||||
this.doc2.getSelection().moveCursorTo(1, 1);
|
||||
assert.position(this.editor.getCursorPosition(), 1, 1);
|
||||
assert.true(called);
|
||||
assert.ok(called);
|
||||
},
|
||||
|
||||
"test: should use selection of new document" : function() {
|
||||
|
|
@ -134,7 +134,7 @@ var Test = {
|
|||
|
||||
this.doc2.getSelection().selectTo(1, 1);
|
||||
assert.position(this.editor.getSelection().getSelectionLead(), 1, 1);
|
||||
assert.true(called);
|
||||
assert.ok(called);
|
||||
},
|
||||
|
||||
"test: should use mode of new document" : function() {
|
||||
|
|
@ -149,7 +149,7 @@ var Test = {
|
|||
assert.false(called);
|
||||
|
||||
this.doc2.setMode(new JavaScriptMode());
|
||||
assert.true(called);
|
||||
assert.ok(called);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ var Test = {
|
|||
});
|
||||
|
||||
emitter._dispatchEvent("juhu");
|
||||
assert.true(called);
|
||||
assert.ok(called);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ var Test = {
|
|||
editor.navigateFileEnd();
|
||||
var cursor = editor.getCursorPosition();
|
||||
|
||||
assert.true(editor.getFirstVisibleRow() <= cursor.row);
|
||||
assert.true(editor.getLastVisibleRow() >= cursor.row);
|
||||
assert.ok(editor.getFirstVisibleRow() <= cursor.row);
|
||||
assert.ok(editor.getLastVisibleRow() >= cursor.row);
|
||||
},
|
||||
|
||||
"test: navigate to start of file should scroll the first row into view" : function() {
|
||||
|
|
|
|||
|
|
@ -66,13 +66,13 @@ var Test = {
|
|||
var range = new Range(0, 20, 3, 10);
|
||||
var range = range.clipRows(10, 30);
|
||||
|
||||
assert.true(range.isEmpty());
|
||||
assert.ok(range.isEmpty());
|
||||
assert.range(range, 10, 0, 10, 0);
|
||||
},
|
||||
|
||||
"test: isEmpty": function() {
|
||||
var range = new Range(1, 2, 1, 2);
|
||||
assert.true(range.isEmpty());
|
||||
assert.ok(range.isEmpty());
|
||||
|
||||
var range = new Range(1, 2, 1, 6);
|
||||
assert.false(range.isEmpty());
|
||||
|
|
@ -83,7 +83,7 @@ var Test = {
|
|||
assert.false(range.isMultiLine());
|
||||
|
||||
var range = new Range(1, 2, 2, 6);
|
||||
assert.true(range.isMultiLine());
|
||||
assert.ok(range.isMultiLine());
|
||||
},
|
||||
|
||||
"test: clone": function() {
|
||||
|
|
@ -103,11 +103,11 @@ var Test = {
|
|||
"test: contains for multi line ranges": function() {
|
||||
var range = new Range(1, 10, 5, 20);
|
||||
|
||||
assert.true(range.contains(1, 10));
|
||||
assert.true(range.contains(2, 0));
|
||||
assert.true(range.contains(3, 100));
|
||||
assert.true(range.contains(5, 19));
|
||||
assert.true(range.contains(5, 20));
|
||||
assert.ok(range.contains(1, 10));
|
||||
assert.ok(range.contains(2, 0));
|
||||
assert.ok(range.contains(3, 100));
|
||||
assert.ok(range.contains(5, 19));
|
||||
assert.ok(range.contains(5, 20));
|
||||
|
||||
assert.false(range.contains(1, 9));
|
||||
assert.false(range.contains(0, 0));
|
||||
|
|
@ -117,9 +117,9 @@ var Test = {
|
|||
"test: contains for single line ranges": function() {
|
||||
var range = new Range(1, 10, 1, 20);
|
||||
|
||||
assert.true(range.contains(1, 10));
|
||||
assert.true(range.contains(1, 15));
|
||||
assert.true(range.contains(1, 20));
|
||||
assert.ok(range.contains(1, 10));
|
||||
assert.ok(range.contains(1, 15));
|
||||
assert.ok(range.contains(1, 20));
|
||||
|
||||
assert.false(range.contains(0, 9));
|
||||
assert.false(range.contains(2, 9));
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ var Test = {
|
|||
});
|
||||
|
||||
selection.moveCursorTo(0, 6);
|
||||
assert.true(called);
|
||||
assert.ok(called);
|
||||
},
|
||||
|
||||
"test: calling setCursor with the same position should not fire an event": function() {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 12d8a98cfc71ca8cbb0faf3c3849cc6d5a72afdd
|
||||
Subproject commit 6024eafb2559208e8f439d6f25a609d8c020d214
|
||||
Loading…
Add table
Add a link
Reference in a new issue