about summary refs log tree commit diff
path: root/src/librustdoc/html/render/write_shared
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2024-11-22 12:58:20 -0700
committerMichael Howell <michael@notriddle.com>2025-08-15 10:26:03 -0700
commit8511e40e7294e1efcc64b81d43969b6bf0f14c2d (patch)
tree13e479663d548c96addeac600e985476e258eae7 /src/librustdoc/html/render/write_shared
parentc018ae5389c49cc4bcb8343d80dd8e7323325410 (diff)
downloadrust-8511e40e7294e1efcc64b81d43969b6bf0f14c2d.tar.gz
rust-8511e40e7294e1efcc64b81d43969b6bf0f14c2d.zip
rustdoc-search: search backend with partitioned suffix tree
Diffstat (limited to 'src/librustdoc/html/render/write_shared')
-rw-r--r--src/librustdoc/html/render/write_shared/tests.rs33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/librustdoc/html/render/write_shared/tests.rs b/src/librustdoc/html/render/write_shared/tests.rs
index 6f185e85345..1989a1f87aa 100644
--- a/src/librustdoc/html/render/write_shared/tests.rs
+++ b/src/librustdoc/html/render/write_shared/tests.rs
@@ -30,14 +30,6 @@ fn sources_template() {
 }
 
 #[test]
-fn sources_parts() {
-    let parts =
-        SearchIndexPart::get(OrderedJson::serialize(["foo", "bar"]).unwrap(), "suffix").unwrap();
-    assert_eq!(&parts.parts[0].0, Path::new("search-indexsuffix.js"));
-    assert_eq!(&parts.parts[0].1.to_string(), r#"["foo","bar"]"#);
-}
-
-#[test]
 fn all_crates_template() {
     let mut template = AllCratesPart::blank();
     assert_eq!(but_last_line(&template.to_string()), r"window.ALL_CRATES = [];");
@@ -55,31 +47,6 @@ fn all_crates_parts() {
 }
 
 #[test]
-fn search_index_template() {
-    let mut template = SearchIndexPart::blank();
-    assert_eq!(
-        but_last_line(&template.to_string()),
-        r"var searchIndex = new Map(JSON.parse('[]'));
-if (typeof exports !== 'undefined') exports.searchIndex = searchIndex;
-else if (window.initSearch) window.initSearch(searchIndex);"
-    );
-    template.append(EscapedJson::from(OrderedJson::serialize([1, 2]).unwrap()).to_string());
-    assert_eq!(
-        but_last_line(&template.to_string()),
-        r"var searchIndex = new Map(JSON.parse('[[1,2]]'));
-if (typeof exports !== 'undefined') exports.searchIndex = searchIndex;
-else if (window.initSearch) window.initSearch(searchIndex);"
-    );
-    template.append(EscapedJson::from(OrderedJson::serialize([4, 3]).unwrap()).to_string());
-    assert_eq!(
-        but_last_line(&template.to_string()),
-        r"var searchIndex = new Map(JSON.parse('[[1,2],[4,3]]'));
-if (typeof exports !== 'undefined') exports.searchIndex = searchIndex;
-else if (window.initSearch) window.initSearch(searchIndex);"
-    );
-}
-
-#[test]
 fn crates_index_part() {
     let external_crates = ["bar".to_string(), "baz".to_string()];
     let mut parts = CratesIndexPart::get("foo", &external_crates).unwrap();