Commit Graph

822 Commits

Author SHA1 Message Date
Tim Schaub
2fd8f4cb00 Integration testing for binary logical operators 2013-06-25 12:11:48 -06:00
Tim Schaub
973606e67a Integration tests for equality operators 2013-06-25 12:11:48 -06:00
Tim Schaub
3a3f9bc20b Integration testing for relational operators
No `instanceof` or `in` operator support.
2013-06-25 12:11:47 -06:00
Tim Schaub
9d5424236c Integration testing for additive operators 2013-06-25 12:11:47 -06:00
Tim Schaub
7c2550fefa Integration testing for multiplicative operators 2013-06-25 12:11:47 -06:00
Tim Schaub
2492515e8f Integration testing for unary operators
Only supporting ! at the moment.
2013-06-25 12:11:47 -06:00
Tim Schaub
e6f03c8f22 Confirm whitespace is consumed as expected 2013-06-25 12:11:47 -06:00
Tim Schaub
26a7d907a2 Test unary expression parsing 2013-06-25 12:11:47 -06:00
Tim Schaub
a0bd736948 Left-hand-side expression parsing 2013-06-25 12:11:47 -06:00
Tim Schaub
803b3a3f7d Binary expression parsing 2013-06-25 12:11:46 -06:00
Tim Schaub
40b12410f0 Increment after scanning >= and <= (and expect EOF in tests) 2013-06-25 12:11:46 -06:00
Tim Schaub
379ac82688 Test argument parsing 2013-06-25 12:11:46 -06:00
Tim Schaub
6d0badcf2a Optional scope (works for expressions without identifiers) 2013-06-25 12:11:46 -06:00
Tim Schaub
d920d8e578 Test left-hand-side expression parsing 2013-06-25 12:11:46 -06:00
Tim Schaub
13d0b8b084 Provide ol.expression.parse method
This is the only method needed in the API.
2013-06-25 12:11:46 -06:00
Tim Schaub
3643ea164f Cast boolean and null before creating literal expression 2013-06-25 12:11:46 -06:00
Tim Schaub
ce67aa2617 Make way for convenience functions in ol.expression package 2013-06-25 12:11:45 -06:00
Tim Schaub
7a1e69e288 Initial parsing tests 2013-06-25 12:11:45 -06:00
Tim Schaub
cb9725bdfb Provide static method to check for valid operators 2013-06-25 12:11:45 -06:00
Tim Schaub
29b77a2dac Member expressions 2013-06-25 12:11:45 -06:00
Tim Schaub
fbb028e15e Call expressions 2013-06-25 12:11:45 -06:00
Tim Schaub
f050546fe2 Logical expressions 2013-06-25 12:11:44 -06:00
Tim Schaub
153df45f95 Math expressions
Just simple binary type expressions supported here.  These can be serialized in a variety of formats.  More complex operations to be supported by call expressions.
2013-06-25 12:11:44 -06:00
Tim Schaub
b2ff793ea1 Comparison expressions 2013-06-25 12:11:44 -06:00
Tim Schaub
052b973b39 Reduce to a single literal 2013-06-25 12:11:44 -06:00
Tim Schaub
20b66fc447 Proper specs 2013-06-25 12:11:43 -06:00
Tim Schaub
0abcbb9854 Stray not 2013-06-25 12:11:43 -06:00
Tim Schaub
a87ebfe97b Specific expression types 2013-06-25 12:11:43 -06:00
Tim Schaub
063b461ffd Fewer calls to charCodeAt 2013-06-25 12:11:43 -06:00
Tim Schaub
f272350e00 Expose next and peek methods 2013-06-25 12:11:42 -06:00
Tim Schaub
5baa38b82c Test punctuator scanning 2013-06-25 12:11:42 -06:00
Tim Schaub
50f94911b1 Scan string literals 2013-06-25 12:11:42 -06:00
Tim Schaub
0844df8cc2 Scanning identifiers
This includes code that is likely not necessary.  The escape sequence scanning will likely not be used in our case, but I'm committing it here so it can be brought back if needed later.
2013-06-25 12:11:42 -06:00
Tim Schaub
040c80a5ad Expectations about token type 2013-06-25 12:11:42 -06:00
Tim Schaub
193cf4de50 Scan numeric literals 2013-06-25 12:11:41 -06:00
Tim Schaub
a5343161bf Separate lexer 2013-06-25 12:11:41 -06:00
Frederic Junod
cd13e700ac Pass options to the base class 2013-06-25 13:13:41 +02:00
Tim Schaub
99ba5a0da8 Store rings so exerior is clockwise and interior is counter-clockwise
KML and WKT don't specify a winding order, so we write those out in CW/CCW order (for exterior/interior).  GML references ISO 19107 that specifies CCW/CW, so we serialize in that winding order.

Having hand generated all this GML data the first time around, I reserve the right to modify it for the tests.
2013-06-24 17:46:36 -06:00
Tim Schaub
e292d8fa12 Add method to determine winding order of linear rings 2013-06-24 17:43:22 -06:00
ahocevar
a14b21d80c Use ol.Projection#.getMetersPerUnit()
As a follow-up to #815, this change makes
ol.tilegrid.createForProjection work in cases where a Proj4
projection does not have units set. For better code readability,
a new variable is used when calculating the resolution.
2013-06-25 00:29:50 +02:00
Tim Schaub
388967d00c Merge pull request #814 from tschaub/814-min-resolution
Fix vector rendering for projections that do not specify units
2013-06-24 11:08:50 -07:00
Tim Schaub
d10eff97a2 Allow getMetersPerUnit to work without units identifier (see #814) 2013-06-24 11:34:16 -06:00
Tim Schaub
d6be28a7bb Get rid of unnecessary waitsFor function
This was a relic from the Jasmine tests.  Mocha tests have a built-in timeout.  Async tests are registered with a function that takes a callback.
2013-06-23 11:20:57 -06:00
Tim Schaub
7a620de1bf Calling callback in WMS capabilities tests 2013-06-23 11:08:34 -06:00
Tim Schaub
be33fd58b3 Calling callback in GML v3 tests 2013-06-23 11:04:03 -06:00
Tim Schaub
54378f394a Calling callback in GML v2 tests 2013-06-23 11:02:38 -06:00
Tim Schaub
7bf24eb918 Calling callback in kml tests
Also reordering things so we have `expect(got).to.xmleql(expected)`.
2013-06-23 11:00:41 -06:00
Tom Payne
b7a1ada94d Merge pull request #798 from twpayne/fix-layer-setters
Don't attempt to constrain values in setters
2013-06-20 09:52:40 -07:00
Tom Payne
aa1a71ed96 Don't attempt to constrain values in setters 2013-06-19 13:38:57 +02:00
Tim Schaub
2ee0805075 Taking advantage of GitHub's rendering of .geojson 2013-06-18 15:39:45 -06:00