Skip to content

Commit 61ba728

Browse files
committed
add coverage for Builder::is_host_target
Signed-off-by: onur-ozkan <[email protected]>
1 parent 909d43b commit 61ba728

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/bootstrap/src/core/builder/tests.rs

+15
Original file line numberDiff line numberDiff line change
@@ -1065,3 +1065,18 @@ fn test_prebuilt_llvm_config_path_resolution() {
10651065
.join(exe("llvm-config", builder.config.build));
10661066
assert_eq!(expected, actual);
10671067
}
1068+
1069+
fn test_is_host_target() {
1070+
let target1 = TargetSelection::from_user(TEST_TRIPLE_1);
1071+
let target2 = TargetSelection::from_user(TEST_TRIPLE_2);
1072+
1073+
for (target1, target2) in [(target1, target2), (target2, target1)] {
1074+
let mut config = configure("build", &[], &[]);
1075+
config.build = target1;
1076+
let build = Build::new(config);
1077+
let builder = Builder::new(&build);
1078+
1079+
assert!(builder.is_host_target(&target1));
1080+
assert!(!builder.is_host_target(&target2));
1081+
}
1082+
}

0 commit comments

Comments
 (0)