add coverage for Builder::is_host_target
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
909d43b38c
commit
61ba728b18
1 changed files with 15 additions and 0 deletions
|
|
@ -1065,3 +1065,18 @@ fn test_prebuilt_llvm_config_path_resolution() {
|
|||
.join(exe("llvm-config", builder.config.build));
|
||||
assert_eq!(expected, actual);
|
||||
}
|
||||
|
||||
fn test_is_host_target() {
|
||||
let target1 = TargetSelection::from_user(TEST_TRIPLE_1);
|
||||
let target2 = TargetSelection::from_user(TEST_TRIPLE_2);
|
||||
|
||||
for (target1, target2) in [(target1, target2), (target2, target1)] {
|
||||
let mut config = configure("build", &[], &[]);
|
||||
config.build = target1;
|
||||
let build = Build::new(config);
|
||||
let builder = Builder::new(&build);
|
||||
|
||||
assert!(builder.is_host_target(&target1));
|
||||
assert!(!builder.is_host_target(&target2));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue