[OpenLayers-Commits] r4188 - in trunk/openlayers/tests: . Format
commits at openlayers.org
commits at openlayers.org
Tue Sep 4 11:28:15 EDT 2007
Author: crschmidt
Date: 2007-09-04 11:28:14 -0400 (Tue, 04 Sep 2007)
New Revision: 4188
Added:
trunk/openlayers/tests/Format/test_KML.html
Modified:
trunk/openlayers/tests/list-tests.html
Log:
Add test_KML stub (does nothing useful.)
Added: trunk/openlayers/tests/Format/test_KML.html
===================================================================
--- trunk/openlayers/tests/Format/test_KML.html (rev 0)
+++ trunk/openlayers/tests/Format/test_KML.html 2007-09-04 15:28:14 UTC (rev 4188)
@@ -0,0 +1,41 @@
+<html>
+<head>
+ <script src="../../lib/OpenLayers.js"></script>
+ <script type="text/javascript">
+
+
+ function test_Format_KML_constructor(t) {
+ t.plan(4);
+
+ var options = {'foo': 'bar'};
+ var format = new OpenLayers.Format.KML(options);
+ t.ok(format instanceof OpenLayers.Format.KML,
+ "new OpenLayers.Format.KML returns object" );
+ t.eq(format.foo, "bar", "constructor sets options correctly");
+ t.eq(typeof format.read, "function", "format has a read function");
+ t.eq(typeof format.write, "function", "format has a write function");
+
+ }
+
+ function test_Format_KML_read(t) {
+ t.plan(1);
+ t.ok(true, "Read tests not done yet.");
+ }
+
+ function test_Format_KML_write(t) {
+ t.plan(1);
+ t.ok(true, "Write tests not done yet.");
+
+ var format = new OpenLayers.Format.KML();
+ //var doc = format.read(text);
+ //var out = format.write(doc);
+ //out = out.replace(/[\r\n]/g, '');
+ //t.eq(text, out,
+ // "correctly writes an KML DOM doc");
+ }
+
+ </script>
+</head>
+<body>
+</body>
+</html>
Modified: trunk/openlayers/tests/list-tests.html
===================================================================
--- trunk/openlayers/tests/list-tests.html 2007-09-04 13:55:59 UTC (rev 4187)
+++ trunk/openlayers/tests/list-tests.html 2007-09-04 15:28:14 UTC (rev 4188)
@@ -21,6 +21,7 @@
<li>Geometry/test_Surface.html</li>
<li>test_Format.html</li>
<li>Format/test_XML.html</li>
+ <li>Format/test_KML.html</li>
<li>Format/test_GeoRSS.html</li>
<li>Format/test_JSON.html</li>
<li>Format/test_GeoJSON.html</li>
More information about the Commits
mailing list