We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2f652f commit 0a34651Copy full SHA for 0a34651
sqlx-postgres/src/types/geometry/box.rs
@@ -254,4 +254,26 @@ mod box_tests {
254
};
255
assert_eq!(pg_box.serialize_to_vec(), BOX_BYTES,)
256
}
257
+
258
+ #[test]
259
+ fn can_order_box() {
260
+ let pg_box = PgBox {
261
+ x1: -2.,
262
+ x2: 2.,
263
+ y1: 2.,
264
+ y2: -2.,
265
+ };
266
+ let bytes = pg_box.serialize_to_vec();
267
268
+ let pg_box = PgBox::from_bytes(&bytes).unwrap();
269
+ assert_eq!(
270
+ pg_box,
271
+ PgBox {
272
+ x1: 2.,
273
274
+ x2: -2.,
275
+ y2: -2.
276
+ }
277
+ )
278
279
0 commit comments