"undefined"!=typeof process&&require("amd-loader"),define(function(a,b,c){"use strict";var d=a("./range").Range,e=a("./edit_session").EditSession,f=a("./test/assertions");c.exports={name:"ACE range.js","test: create range":function(){var a=new d(1,2,3,4);f.equal(a.start.row,1),f.equal(a.start.column,2),f.equal(a.end.row,3),f.equal(a.end.column,4)},"test: create from points":function(){var a=d.fromPoints({row:1,column:2},{row:3,column:4});f.equal(a.start.row,1),f.equal(a.start.column,2),f.equal(a.end.row,3),f.equal(a.end.column,4)},"test: clip to rows":function(){f.range(new d(0,20,100,30).clipRows(10,30),10,0,31,0),f.range(new d(0,20,30,10).clipRows(10,30),10,0,30,10);var a=new d(0,20,3,10),a=a.clipRows(10,30);f.ok(a.isEmpty()),f.range(a,10,0,10,0)},"test: isEmpty":function(){var a=new d(1,2,1,2);f.ok(a.isEmpty());var a=new d(1,2,1,6);f.notOk(a.isEmpty())},"test: is multi line":function(){var a=new d(1,2,1,6);f.notOk(a.isMultiLine());var a=new d(1,2,2,6);f.ok(a.isMultiLine())},"test: clone":function(){var a=new d(1,2,3,4),b=a.clone();f.position(b.start,1,2),f.position(b.end,3,4),b.start.column=20,f.position(a.start,1,2),b.end.column=20,f.position(a.end,3,4)},"test: contains for multi line ranges":function(){var a=new d(1,10,5,20);f.ok(a.contains(1,10)),f.ok(a.contains(2,0)),f.ok(a.contains(3,100)),f.ok(a.contains(5,19)),f.ok(a.contains(5,20)),f.notOk(a.contains(1,9)),f.notOk(a.contains(0,0)),f.notOk(a.contains(5,21))},"test: contains for single line ranges":function(){var a=new d(1,10,1,20);f.ok(a.contains(1,10)),f.ok(a.contains(1,15)),f.ok(a.contains(1,20)),f.notOk(a.contains(0,9)),f.notOk(a.contains(2,9)),f.notOk(a.contains(1,9)),f.notOk(a.contains(1,21))},"test: extend range":function(){var a=new d(2,10,2,30),a=a.extend(2,5);f.range(a,2,5,2,30);var a=a.extend(2,35);f.range(a,2,5,2,35);var a=a.extend(2,15);f.range(a,2,5,2,35);var a=a.extend(1,4);f.range(a,1,4,2,35);var a=a.extend(6,10);f.range(a,1,4,6,10)},"test: collapse rows":function(){var a=new d(0,2,1,2);f.range(a.collapseRows(),0,0,1,0);var a=new d(2,2,3,1);f.range(a.collapseRows(),2,0,3,0);var a=new d(2,2,3,0);f.range(a.collapseRows(),2,0,2,0);var a=new d(2,0,2,0);f.range(a.collapseRows(),2,0,2,0)},"test: to screen range":function(){var a=new e(["juhu","12\t\t34","ぁぁa","\t\t34"]),b=new d(0,0,0,3);f.range(b.toScreenRange(a),0,0,0,3);var b=new d(1,1,1,3);f.range(b.toScreenRange(a),1,1,1,4);var b=new d(2,1,2,2);f.range(b.toScreenRange(a),2,2,2,4);var b=new d(3,0,3,4);f.range(b.toScreenRange(a),3,0,3,10)}}}),"undefined"!=typeof module&&module===require.main&&require("asyncjs").test.testcase(module.exports).exec();