From d9d15369a58706e181af5b790f693ee32d9782c9 Mon Sep 17 00:00:00 2001 From: Caleb Cartwright Date: Wed, 4 Nov 2020 21:49:52 -0600 Subject: [PATCH] tests: fix tooltip tests --- .../test_tooltip_mod_use_external.rs.0004_012.json | 8 +++++++- .../test_tooltip_mod_use_external.rs.0005_012.json | 8 +++++++- .../hover/save_data/test_tooltip_std.rs.0015_017.json | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/fixtures/hover/save_data/test_tooltip_mod_use_external.rs.0004_012.json b/tests/fixtures/hover/save_data/test_tooltip_mod_use_external.rs.0004_012.json index 2155bbfa9f7..5bf7ce7251a 100644 --- a/tests/fixtures/hover/save_data/test_tooltip_mod_use_external.rs.0004_012.json +++ b/tests/fixtures/hover/save_data/test_tooltip_mod_use_external.rs.0004_012.json @@ -5,6 +5,12 @@ "col": 12 }, "data": { - "Ok": [] + "Ok": [ + { + "language": "rust", + "value": "std/src/sync/mod.rs" + }, + "Useful synchronization primitives.\n\n## The need for synchronization\n\nConceptually, a Rust program is a series of operations which will\nbe executed on a computer. The timeline of events happening in the\nprogram is consistent with the order of the operations in the code.\n\nConsider the following code, operating on some global static variables:\n\n```rust\nstatic mut A: u32 = 0;" + ] } } diff --git a/tests/fixtures/hover/save_data/test_tooltip_mod_use_external.rs.0005_012.json b/tests/fixtures/hover/save_data/test_tooltip_mod_use_external.rs.0005_012.json index c297747e7c1..8c9fde99b37 100644 --- a/tests/fixtures/hover/save_data/test_tooltip_mod_use_external.rs.0005_012.json +++ b/tests/fixtures/hover/save_data/test_tooltip_mod_use_external.rs.0005_012.json @@ -5,6 +5,12 @@ "col": 12 }, "data": { - "Ok": [] + "Ok": [ + { + "language": "rust", + "value": "std/src/sync/mod.rs" + }, + "Useful synchronization primitives.\n\n## The need for synchronization\n\nConceptually, a Rust program is a series of operations which will\nbe executed on a computer. The timeline of events happening in the\nprogram is consistent with the order of the operations in the code.\n\nConsider the following code, operating on some global static variables:\n\n```rust\nstatic mut A: u32 = 0;" + ] } } diff --git a/tests/fixtures/hover/save_data/test_tooltip_std.rs.0015_017.json b/tests/fixtures/hover/save_data/test_tooltip_std.rs.0015_017.json index 5fd627d906d..77fa7edc57f 100644 --- a/tests/fixtures/hover/save_data/test_tooltip_std.rs.0015_017.json +++ b/tests/fixtures/hover/save_data/test_tooltip_std.rs.0015_017.json @@ -11,7 +11,7 @@ "value": "library/alloc/src/string.rs" }, "https://doc.rust-lang.org/nightly/alloc/string/", - "A UTF-8 encoded, growable string.\n\nThis module contains the [`String`] type, a trait for converting\n[`ToString`]s, and several error types that may result from working with\n[`String`]s.\n\n# Examples\n\nThere are multiple ways to create a new [`String`] from a string literal:\n\n```rust\nlet s = \"Hello\".to_string();\n\nlet s = String::from(\"world\");\nlet s: String = \"also this\".into();\n```\n\nYou can create a new [`String`] from an existing one by concatenating with\n`+`:\n\n```rust\nlet s = \"Hello\".to_string();\n\nlet message = s + \" world!\";\n```\n\nIf you have a vector of valid UTF-8 bytes, you can make a [`String`] out of\nit. You can do the reverse too.\n\n```rust\nlet sparkle_heart = vec![240, 159, 146, 150];\n\n// We know these bytes are valid, so we'll use `unwrap()`.\nlet sparkle_heart = String::from_utf8(sparkle_heart).unwrap();\n\nassert_eq!(\"💖\", sparkle_heart);\n\nlet bytes = sparkle_heart.into_bytes();\n\nassert_eq!(bytes, [240, 159, 146, 150]);\n```" + "A UTF-8–encoded, growable string.\n\nThis module contains the [`String`] type, the [`ToString`] trait for\nconverting to strings, and several error types that may result from\nworking with [`String`]s.\n\n# Examples\n\nThere are multiple ways to create a new [`String`] from a string literal:\n\n```rust\nlet s = \"Hello\".to_string();\n\nlet s = String::from(\"world\");\nlet s: String = \"also this\".into();\n```\n\nYou can create a new [`String`] from an existing one by concatenating with\n`+`:\n\n```rust\nlet s = \"Hello\".to_string();\n\nlet message = s + \" world!\";\n```\n\nIf you have a vector of valid UTF-8 bytes, you can make a [`String`] out of\nit. You can do the reverse too.\n\n```rust\nlet sparkle_heart = vec![240, 159, 146, 150];\n\n// We know these bytes are valid, so we'll use `unwrap()`.\nlet sparkle_heart = String::from_utf8(sparkle_heart).unwrap();\n\nassert_eq!(\"💖\", sparkle_heart);\n\nlet bytes = sparkle_heart.into_bytes();\n\nassert_eq!(bytes, [240, 159, 146, 150]);\n```" ] } } \ No newline at end of file