2012-09-04 06:22:24 +08:00
|
|
|
describe('LatLngBounds', function() {
|
|
|
|
var a, c;
|
|
|
|
|
|
|
|
beforeEach(function() {
|
2012-10-07 02:01:17 +08:00
|
|
|
a = new L.LatLngBounds(
|
|
|
|
new L.LatLng(14, 12),
|
|
|
|
new L.LatLng(30, 40));
|
|
|
|
c = new L.LatLngBounds();
|
2012-09-04 06:22:24 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
describe('#isValid', function() {
|
|
|
|
it('should return true if properly set up', function() {
|
|
|
|
expect(a.isValid()).toBeTruthy();
|
|
|
|
});
|
|
|
|
it('should return false if is invalid', function() {
|
|
|
|
expect(c.isValid()).toBeFalsy();
|
|
|
|
});
|
|
|
|
it('should be valid if extended', function() {
|
|
|
|
c.extend([0, 0]);
|
|
|
|
expect(c.isValid()).toBeTruthy();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|