@@ -38,15 +38,14 @@ var tests = [
38
38
{ type : 'longtext' , insert : 'Hello World' } ,
39
39
{ type : 'text' , insert : 'Hello World' } ,
40
40
{ type : 'point' , insertRaw : 'POINT(1.2,-3.4)' , expect : { x : 1.2 , y : - 3.4 } , deep : true } ,
41
- { type : 'point' , insertRaw : 'GeomFromWKB(X\'010100000066666666666616c0f6285c8fc2752440\')' , expect : { x : - 5.6 , y : 10.23 } , deep : true } ,
42
41
{ type : 'point' , insertRaw : '' , insert : null , expect : null } ,
43
42
{ type : 'linestring' , insertRaw : 'LINESTRING(POINT(1.2,-3.4),POINT(-5.6,10.23),POINT(0.2,0.7))' , expect : [ { x : 1.2 , y : - 3.4 } , { x : - 5.6 , y : 10.23 } , { x : 0.2 , y : 0.7 } ] , deep : true } ,
44
- { type : 'polygon' , insertRaw : "GeomFromText( 'POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7, 5 5))')" , expect : [ [ { x : 0 , y : 0 } , { x : 10 , y : 0 } , { x : 10 , y : 10 } , { x : 0 , y : 10 } , { x : 0 , y : 0 } ] , [ { x : 5 , y : 5 } , { x : 7 , y : 5 } , { x : 7 , y : 7 } , { x : 5 , y : 7 } , { x : 5 , y : 5 } ] ] , deep : true } ,
43
+ { type : 'polygon' , insertRaw : 'POLYGON(LINESTRING(POINT(0,0),POINT(10,0),POINT(10,10),POINT(0,10),POINT(0,0)),LINESTRING(POINT(5,5),POINT(7,5),POINT(7,7),POINT(5,7),POINT(5, 5)))' , expect : [ [ { x : 0 , y : 0 } , { x : 10 , y : 0 } , { x : 10 , y : 10 } , { x : 0 , y : 10 } , { x : 0 , y : 0 } ] , [ { x : 5 , y : 5 } , { x : 7 , y : 5 } , { x : 7 , y : 7 } , { x : 5 , y : 7 } , { x : 5 , y : 5 } ] ] , deep : true } ,
45
44
{ type : 'geometry' , insertRaw : 'POINT(1.2,-3.4)' , expect : { x : 1.2 , y : - 3.4 } , deep : true } ,
46
- { type : 'multipoint' , insertRaw : "GeomFromText( 'MULTIPOINT(0 0, 20 20, 60 60)')" , expect : [ { x : 0 , y : 0 } , { x : 20 , y : 20 } , { x : 60 , y : 60 } ] , deep : true } ,
47
- { type : 'multilinestring' , insertRaw : "GeomFromText( 'MULTILINESTRING((10 10, 20 20), (15 15, 30 15))')" , expect : [ [ { x : 10 , y : 10 } , { x : 20 , y : 20 } ] , [ { x : 15 , y : 15 } , { x : 30 , y : 15 } ] ] , deep : true } ,
48
- { type : 'multipolygon' , insertRaw : "GeomFromText( 'MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((5 5,7 5,7 7,5 7, 5 5)))')" , expect : [ [ [ { x : 0 , y : 0 } , { x : 10 , y : 0 } , { x : 10 , y : 10 } , { x : 0 , y : 10 } , { x : 0 , y : 0 } ] ] , [ [ { x : 5 , y : 5 } , { x : 7 , y : 5 } , { x : 7 , y : 7 } , { x : 5 , y : 7 } , { x : 5 , y : 5 } ] ] ] , deep : true } ,
49
- { type : 'geometrycollection' , insertRaw : "GeomFromText( 'GEOMETRYCOLLECTION(POINT(10 10), POINT(30 30), LINESTRING(15 15, 20 20))')" , expect : [ { x : 10 , y : 10 } , { x : 30 , y : 30 } , [ { x : 15 , y : 15 } , { x : 20 , y : 20 } ] ] , deep : true }
45
+ { type : 'multipoint' , insertRaw : 'MULTIPOINT(POINT(0,0),POINT(20,20),POINT(60, 60))' , expect : [ { x : 0 , y : 0 } , { x : 20 , y : 20 } , { x : 60 , y : 60 } ] , deep : true } ,
46
+ { type : 'multilinestring' , insertRaw : 'MULTILINESTRING(LINESTRING(POINT(10,10),POINT(20, 20)),LINESTRING(POINT(15,15),POINT(30, 15)))' , expect : [ [ { x : 10 , y : 10 } , { x : 20 , y : 20 } ] , [ { x : 15 , y : 15 } , { x : 30 , y : 15 } ] ] , deep : true } ,
47
+ { type : 'multipolygon' , insertRaw : 'MULTIPOLYGON(POLYGON(LINESTRING(POINT(0,0),POINT(10,0),POINT(10,10),POINT(0,10),POINT(0, 0))),POLYGON(LINESTRING(POINT(5,5),POINT(7,5),POINT(7,7),POINT(5,7),POINT(5, 5))))' , expect : [ [ [ { x : 0 , y : 0 } , { x : 10 , y : 0 } , { x : 10 , y : 10 } , { x : 0 , y : 10 } , { x : 0 , y : 0 } ] ] , [ [ { x : 5 , y : 5 } , { x : 7 , y : 5 } , { x : 7 , y : 7 } , { x : 5 , y : 7 } , { x : 5 , y : 5 } ] ] ] , deep : true } ,
48
+ { type : 'geometrycollection' , insertRaw : 'GEOMETRYCOLLECTION(POINT(10, 10),POINT(30, 30),LINESTRING(POINT(15,15),POINT(20, 20)))' , expect : [ { x : 10 , y : 10 } , { x : 30 , y : 30 } , [ { x : 15 , y : 15 } , { x : 20 , y : 20 } ] ] , deep : true }
50
49
] ;
51
50
52
51
var table = 'type_casting' ;
0 commit comments