about summary refs log tree commit diff
path: root/src/bootstrap/builder
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap/builder')
-rw-r--r--src/bootstrap/builder/tests.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bootstrap/builder/tests.rs b/src/bootstrap/builder/tests.rs
index 4ab502e9052..f030917d7a4 100644
--- a/src/bootstrap/builder/tests.rs
+++ b/src/bootstrap/builder/tests.rs
@@ -47,6 +47,13 @@ fn run_build(paths: &[PathBuf], config: Config) -> Cache {
 }
 
 #[test]
+fn test_intersection() {
+    let set = PathSet::Set(["library/core", "library/alloc", "library/std"].into_iter().map(TaskPath::parse).collect());
+    let subset = set.intersection(&[Path::new("library/core"), Path::new("library/alloc"), Path::new("library/stdarch")], None);
+    assert_eq!(subset, PathSet::Set(["library/core", "library/alloc"].into_iter().map(TaskPath::parse).collect()));
+}
+
+#[test]
 fn test_exclude() {
     let mut config = configure("test", &["A"], &["A"]);
     config.exclude = vec![TaskPath::parse("src/tools/tidy")];
@@ -539,7 +546,7 @@ mod dist {
                 target: host,
                 mode: Mode::Std,
                 test_kind: test::TestKind::Test,
-                krate: INTERNER.intern_str("std"),
+                crates: vec![INTERNER.intern_str("std")],
             },]
         );
     }