()
| 1987 | |
| 1988 | #[test] |
| 1989 | fn integer_from_json() { |
| 1990 | assert_eq!( |
| 1991 | i32::try_from_value(Value::Json(Some(serde_json::json!(42)))).unwrap(), |
| 1992 | 42 |
| 1993 | ); |
| 1994 | assert_eq!( |
| 1995 | i32::try_from_value(Value::Json(Some(serde_json::json!("99")))).unwrap(), |
| 1996 | 99 |
| 1997 | ); |
| 1998 | assert_eq!( |
| 1999 | i32::try_from_value(Value::Json(Some(serde_json::json!(5.0)))).unwrap(), |
| 2000 | 5 |
| 2001 | ); |
| 2002 | } |
| 2003 | |
| 2004 | #[test] |
| 2005 | fn integer_from_varchar_and_unknown() { |
nothing calls this directly
no outgoing calls
no test coverage detected