• Home
  • Raw
  • Download

Lines Matching refs:to_string

32     from_reader, from_slice, from_str, from_value, json, to_string, to_string_pretty, to_value,
92 let out = out.to_string(); in test_encode_ok()
94 let s = to_string(value).unwrap(); in test_encode_ok()
98 let s = to_string(&v).unwrap(); in test_encode_ok()
108 let out = out.to_string(); in test_pretty_encode_ok()
128 let tests = &[(3u64, "3"), (u64::MAX, &u64::MAX.to_string())]; in test_write_u64()
139 (i64::MIN, &i64::MIN.to_string()), in test_write_i64()
262 (treemap!("a".to_string() => true), "{\"a\":true}"), in test_write_object()
265 "a".to_string() => true, in test_write_object()
266 "b".to_string() => false in test_write_object()
275 "a".to_string() => treemap![], in test_write_object()
276 "b".to_string() => treemap![], in test_write_object()
277 "c".to_string() => treemap![] in test_write_object()
283 "a".to_string() => treemap![ in test_write_object()
284 "a".to_string() => treemap!["a" => vec![1,2,3]], in test_write_object()
285 "b".to_string() => treemap![], in test_write_object()
286 "c".to_string() => treemap![] in test_write_object()
288 "b".to_string() => treemap![], in test_write_object()
289 "c".to_string() => treemap![] in test_write_object()
295 "a".to_string() => treemap![], in test_write_object()
296 "b".to_string() => treemap![ in test_write_object()
297 "a".to_string() => treemap!["a" => vec![1,2,3]], in test_write_object()
298 "b".to_string() => treemap![], in test_write_object()
299 "c".to_string() => treemap![] in test_write_object()
301 "c".to_string() => treemap![] in test_write_object()
307 "a".to_string() => treemap![], in test_write_object()
308 "b".to_string() => treemap![], in test_write_object()
309 "c".to_string() => treemap![ in test_write_object()
310 "a".to_string() => treemap!["a" => vec![1,2,3]], in test_write_object()
311 "b".to_string() => treemap![], in test_write_object()
312 "c".to_string() => treemap![] in test_write_object()
324 "a".to_string() => treemap![], in test_write_object()
325 "b".to_string() => treemap![], in test_write_object()
326 "c".to_string() => treemap![] in test_write_object()
336 "a".to_string() => treemap![ in test_write_object()
337 "a".to_string() => treemap!["a" => vec![1,2,3]], in test_write_object()
338 "b".to_string() => treemap![], in test_write_object()
339 "c".to_string() => treemap![] in test_write_object()
341 "b".to_string() => treemap![], in test_write_object()
342 "c".to_string() => treemap![] in test_write_object()
362 "a".to_string() => treemap![], in test_write_object()
363 "b".to_string() => treemap![ in test_write_object()
364 "a".to_string() => treemap!["a" => vec![1,2,3]], in test_write_object()
365 "b".to_string() => treemap![], in test_write_object()
366 "c".to_string() => treemap![] in test_write_object()
368 "c".to_string() => treemap![] in test_write_object()
388 "a".to_string() => treemap![], in test_write_object()
389 "b".to_string() => treemap![], in test_write_object()
390 "c".to_string() => treemap![ in test_write_object()
391 "a".to_string() => treemap!["a" => vec![1,2,3]], in test_write_object()
392 "b".to_string() => treemap![], in test_write_object()
393 "c".to_string() => treemap![] in test_write_object()
417 treemap!("a".to_string() => true), in test_write_object()
424 "a".to_string() => true, in test_write_object()
425 "b".to_string() => false in test_write_object()
486 Animal::Frog("Henry".to_string(), vec![]), in test_write_enum()
490 Animal::Frog("Henry".to_string(), vec![349]), in test_write_enum()
494 Animal::Frog("Henry".to_string(), vec![349, 102]), in test_write_enum()
500 name: "Kate".to_string(), in test_write_enum()
505 Animal::AntHive(vec!["Bob".to_string(), "Stuart".to_string()]), in test_write_enum()
513 Animal::Frog("Henry".to_string(), vec![]), in test_write_enum()
522 Animal::Frog("Henry".to_string(), vec![349]), in test_write_enum()
533 Animal::Frog("Henry".to_string(), vec![349, 102]), in test_write_enum()
649 let actual = $name::<$($ty),*>($arg).unwrap_err().to_string();
679 let actual = s.parse::<T>().unwrap_err().to_string(); in test_fromstr_parse_err()
804 (&i64::MIN.to_string(), i64::MIN), in test_parse_i64()
805 (&i64::MAX.to_string(), i64::MAX), in test_parse_i64()
815 (&u64::MAX.to_string(), u64::MAX), in test_parse_u64()
966 let json = serde_json::to_string(&float).unwrap(); in test_roundtrip_f64()
977 let json = serde_json::to_string(&float).unwrap(); in test_roundtrip_f32()
1006 .to_string(); in test_malicious_number()
1110 ("\"foo\"", "foo".to_string()), in test_parse_string()
1111 (" \"foo\" ", "foo".to_string()), in test_parse_string()
1112 ("\"\\\"\"", "\"".to_string()), in test_parse_string()
1113 ("\"\\b\"", "\x08".to_string()), in test_parse_string()
1114 ("\"\\n\"", "\n".to_string()), in test_parse_string()
1115 ("\"\\r\"", "\r".to_string()), in test_parse_string()
1116 ("\"\\t\"", "\t".to_string()), in test_parse_string()
1117 ("\"\\u12ab\"", "\u{12ab}".to_string()), in test_parse_string()
1118 ("\"\\uAB12\"", "\u{AB12}".to_string()), in test_parse_string()
1119 ("\"\\uD83C\\uDF95\"", "\u{1F395}".to_string()), in test_parse_string()
1177 ("{\"a\":3}", treemap!("a".to_string() => 3u64)), in test_parse_object()
1178 ("{ \"a\" : 3 }", treemap!("a".to_string() => 3)), in test_parse_object()
1181 treemap!("a".to_string() => 3, "b".to_string() => 4), in test_parse_object()
1185 treemap!("a".to_string() => 3, "b".to_string() => 4), in test_parse_object()
1192 "a".to_string() => treemap!( in test_parse_object()
1193 "b".to_string() => 3u64, in test_parse_object()
1194 "c".to_string() => 4 in test_parse_object()
1241 c: vec!["abc".to_string(), "xyz".to_string()], in test_parse_struct()
1262 c: vec!["abc".to_string(), "xyz".to_string()], in test_parse_struct()
1276 ("\"jodhpurs\"", Some("jodhpurs".to_string())), in test_parse_option()
1331 Animal::Frog("Henry".to_string(), vec![]), in test_parse_enum()
1335 Animal::Frog("Henry".to_string(), vec![349, 102]), in test_parse_enum()
1341 name: "Kate".to_string(), in test_parse_enum()
1348 name: "Kate".to_string(), in test_parse_enum()
1353 Animal::AntHive(vec!["Bob".to_string(), "Stuart".to_string()]), in test_parse_enum()
1370 "a".to_string() => Animal::Dog, in test_parse_enum()
1371 "b".to_string() => Animal::Frog("Henry".to_string(), vec![]) in test_parse_enum()
1652 message: "hi there".to_string(), in test_deserialize_from_stream()
1670 assert_eq!(err.to_string(), "key must be a string"); in test_serialize_rejects_bool_keys()
1682 assert_eq!(err.to_string(), "key must be a string"); in test_serialize_rejects_adt_keys()
1689 assert_eq!(to_string(&bytes).unwrap(), "[]".to_string()); in test_bytes_ser()
1693 assert_eq!(to_string(&bytes).unwrap(), "[1,2,3]".to_string()); in test_bytes_ser()
1699 assert_eq!(to_string(&bytes).unwrap(), "[]".to_string()); in test_byte_buf_ser()
1702 assert_eq!(to_string(&bytes).unwrap(), "[1,2,3]".to_string()); in test_byte_buf_ser()
1911 assert_eq!(to_string(&map).unwrap(), j); in test_integer128_key()
2014 let s = $n.to_string();
2152 let expected = integer128.to_string(); in test_integer128()
2153 assert_eq!(to_string(integer128).unwrap(), expected); in test_integer128()
2158 let expected = integer128.to_string(); in test_integer128()
2159 assert_eq!(to_string(integer128).unwrap(), expected); in test_integer128()
2189 let expected = integer128.to_string(); in test_integer128_to_value()
2190 assert_eq!(to_value(integer128).unwrap().to_string(), expected); in test_integer128_to_value()
2194 let expected = integer128.to_string(); in test_integer128_to_value()
2195 assert_eq!(to_value(integer128).unwrap().to_string(), expected); in test_integer128_to_value()
2200 assert_eq!(err.to_string(), "number out of range"); in test_integer128_to_value()
2219 let wrapper_to_string = serde_json::to_string(&wrapper_from_str).unwrap(); in test_borrowed_raw_value()
2232 let array_to_string = serde_json::to_string(&array_from_str).unwrap(); in test_borrowed_raw_value()
2296 let wrapper_to_string = serde_json::to_string(&wrapper_from_str).unwrap(); in test_boxed_raw_value()
2316 let array_to_string = serde_json::to_string(&array_from_str).unwrap(); in test_boxed_raw_value()
2328 value_err.to_string(), in test_raw_invalid_utf8()
2332 raw_value_err.to_string(), in test_raw_invalid_utf8()