fix renderer test

This commit is contained in:
nightwing 2015-05-15 02:48:03 +04:00
commit 88d8cf3447

View file

@ -66,8 +66,8 @@ module.exports = {
editor && editor.destroy(); editor && editor.destroy();
editor = null; editor = null;
}, },
"test: screen2text the column should be rounded to the next character edge" : function() { "test: screen2text the column should be rounded to the next character edge" : function(done) {
if (!editor) return; if (!editor) return done();
var renderer = editor.renderer; var renderer = editor.renderer;
renderer.setPadding(0); renderer.setPadding(0);
@ -86,12 +86,12 @@ module.exports = {
testPixelToText(9, 0, 0, 1); testPixelToText(9, 0, 0, 1);
testPixelToText(10, 0, 0, 1); testPixelToText(10, 0, 0, 1);
testPixelToText(14, 0, 0, 1); testPixelToText(14, 0, 0, 1);
testPixelToText(15, 0, 0, 2); testPixelToText(15, 0, 0, 2);
done();
}, },
"test scrollmargin + autosize": function(done) { "test scrollmargin + autosize": function(done) {
var editor = initAce(); if (!editor) return done();
if (!editor) return;
editor.setOptions({ editor.setOptions({
maxLines: 100, maxLines: 100,
useWrapMode: true useWrapMode: true