rm trivial tests
@@ -52,35 +52,3 @@ mod quickcheck_impls {
}
}
}
-
-#[test]
-fn cents_to_sql() {
- let mut bytes = vec![];
- let test_cents = PgMoney(72624976668147840);
- ToSql::<types::Money, Pg>::to_sql(&test_cents, &mut bytes).unwrap();
- assert_eq!(bytes,
- [0x1, 0x1 << 1, 0x1 << 2, 0x1 << 3, 0x1 << 4, 0x1 << 5, 0x1 << 6, 0x1 << 7]);
-}
-
-#[test]
-fn some_cents_from_sql() {
- let input = [0x1, 0x1 << 1, 0x1 << 2, 0x1 << 3, 0x1 << 4, 0x1 << 5, 0x1 << 6, 0x1 << 7];
- let output_cents: PgMoney = FromSql::<types::Money, Pg>::from_sql(Some(&input)).unwrap();
- assert_eq!(output_cents, PgMoney(72624976668147840));
-}
-
-#[test]
-fn bad_cents_from_sql() {
- let undersized = [0x1 << 1, 0x1 << 2, 0x1 << 3, 0x1 << 4, 0x1 << 5, 0x1 << 6, 0x1 << 7];
- let bad_cents: Result<PgMoney, _> = FromSql::<types::Money, Pg>::from_sql(Some(&undersized));
- assert_eq!(bad_cents.unwrap_err().description(),
- "failed to fill whole buffer");
-}
-
-#[test]
-fn no_cents_from_sql() {
- let no_cents: Result<PgMoney, Box<Error + Send + Sync>> =
- FromSql::<types::Money, Pg>::from_sql(None);
- assert_eq!(no_cents.unwrap_err().description(),
- "Unexpected null for non-null column");
-}
