MCPcopy Create free account
hub / github.com/erans/pgsqlite / test_decimal_precision_preservation

Function test_decimal_precision_preservation

tests/decimal_integration_test.rs:239–255  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

237
238#[tokio::test]
239async fn test_decimal_precision_preservation() {
240 let ctx = setup_test_db().await;
241
242 // Insert precise values
243 ctx.execute(
244 "INSERT INTO transactions (amount, fee) VALUES
245 ('123.456789', '1.234567')"
246 ).await.unwrap();
247
248 // Calculate with high precision
249 let result = ctx.query(
250 "SELECT amount * fee / 100 FROM transactions"
251 ).await.unwrap();
252
253 assert_eq!(result.rows.len(), 1);
254 // Result should maintain precision through decimal operations
255}
256
257#[tokio::test]
258async fn test_mixed_type_operations() {

Callers

nothing calls this directly

Calls 3

setup_test_dbFunction · 0.70
executeMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected