|
Revision 7982, 0.7 kB
(checked in by tschaub, 3 months ago)
|
Adding readers and writers properties to xml formats. These will contain public functions used in serializing and deserializing various formats. Shorthand methods for calling these readers & writers are writeNode and readNode. r=ahocever (closes #1722)
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
<html> |
|---|
| 2 |
<head> |
|---|
| 3 |
<script src="../lib/OpenLayers.js"></script> |
|---|
| 4 |
<script type="text/javascript"> |
|---|
| 5 |
|
|---|
| 6 |
function test_Format_constructor(t) { |
|---|
| 7 |
t.plan(5); |
|---|
| 8 |
|
|---|
| 9 |
var options = {'foo': 'bar'}; |
|---|
| 10 |
var format = new OpenLayers.Format(options); |
|---|
| 11 |
t.ok(format instanceof OpenLayers.Format, |
|---|
| 12 |
"new OpenLayers.Format returns object" ); |
|---|
| 13 |
t.eq(format.foo, "bar", "constructor sets options correctly"); |
|---|
| 14 |
t.eq(typeof format.read, "function", "format has a read function"); |
|---|
| 15 |
t.eq(typeof format.write, "function", "format has a write function"); |
|---|
| 16 |
t.eq(format.options, options, "format.options correctly set"); |
|---|
| 17 |
} |
|---|
| 18 |
|
|---|
| 19 |
</script> |
|---|
| 20 |
</head> |
|---|
| 21 |
<body> |
|---|
| 22 |
</body> |
|---|
| 23 |
</html> |
|---|