Make more Loc tests pass.

This commit is contained in:
Tom Payne
2012-06-19 12:33:59 +02:00
parent 95fe8762da
commit ef83910c3d
3 changed files with 61 additions and 34 deletions

View File

@@ -1,18 +1,25 @@
describe("ol.Loc", function() {
it("allows flexible construction", function() {
it("allows empty construction", function() {
var loc;
// nowhere
loc = ol.loc();
expect(loc instanceof ol.Loc).toBe(true);
});
it("allows construction from an obj config", function() {
var loc;
// obj config
loc = ol.loc({x: 10, y: 20});
expect(loc.x()).toBe(10);
expect(loc.y()).toBe(20);
});
it("allows construction from an array config", function() {
var loc;
// array config
loc = ol.loc([30, 40]);