Permalink
Browse files

Location tests

  • Loading branch information...
tmcw committed Jan 24, 2012
1 parent 9969501 commit 70d0a595d83d50a3ec020011d8a01edea2200abf
Showing with 16 additions and 0 deletions.
  1. +1 −0 test/browser/index.html
  2. +15 −0 test/browser/spec/Location.js
View
@@ -19,6 +19,7 @@
<script type="text/javascript" src="spec/Point.js"></script>
<script type="text/javascript" src="spec/Map.js"></script>
<script type="text/javascript" src="spec/Layer.js"></script>
+ <script type="text/javascript" src="spec/Location.js"></script>
<script type="text/javascript" src="spec/DragHandler.js"></script>
<script type="text/javascript" src="spec/MouseWheelHandler.js"></script>
<script type="text/javascript" src="spec/DoubleClickHandler.js"></script>
@@ -0,0 +1,15 @@
+describe('Location', function() {
+ it('creates a location', function() {
+ var p = new MM.Location(0, 1);
+ expect(p.lon).toEqual(1);
+ expect(p.lat).toEqual(0);
+ });
+ it('can be copied', function() {
+ var p = new MM.Location(0, 1);
+ expect(p.lon).toEqual(1);
+ expect(p.lat).toEqual(0);
+ var cp = p.copy();
+ expect(cp.lon).toEqual(1);
+ expect(cp.lat).toEqual(0);
+ });
+});

0 comments on commit 70d0a59

Please sign in to comment.