s2-postgis icon indicating copy to clipboard operation
s2-postgis copied to clipboard

Assert s2_test

Open ppKrauss opened this issue 5 years ago • 1 comments

The assert validation is very commom in software package distributions... PostgreSQL have assert clause since v9.5, so a possible option is to change all s2_test.sql (example).

Other option, the easiest, is to add at git a s2_test.txt file with the s2_test.sql, that is,
psql _etc_ < s2_test.sql > s2_test.txt.
So, any one can assert by diff... or checking md5sum s2_test.txt, the my is 7d80522b55bd6e3270fb8ffde3a161cd.


My s2_test.txt:

 s2_cellid_from_latlng 
-----------------------
   1152921504606846977
(1 row)

 s2_cellid_from_latlng 
-----------------------
  -8689295774057980903
(1 row)

        s2_latlng_from_cellid         
--------------------------------------
 (40.4999999678024,-105.499999974886)
(1 row)

.....

 s2_token_edge_neighbors 
-------------------------
 87696d
 876969
 876941
 876915
(4 rows)

 s2_token_contains 
-------------------
 f
(1 row)

 s2_token_contains 
-------------------
 t
(1 row)

 s2_token_intersects 
---------------------
 t
(1 row)

 s2_token_intersects 
---------------------
 t
(1 row)

ppKrauss avatar Oct 22 '18 22:10 ppKrauss