Simplify equality checks.
This commit is contained in:
parent
5b9ba4c550
commit
b55468c8fe
|
@ -264,9 +264,9 @@ fn runtest(test: &str, cratename: &str, cfgs: Vec<String>, libs: SearchPaths,
|
||||||
Ok(r) => {
|
Ok(r) => {
|
||||||
match r {
|
match r {
|
||||||
Err(count) => {
|
Err(count) => {
|
||||||
if count > 0 && compile_fail == false {
|
if count > 0 && !compile_fail {
|
||||||
sess.fatal("aborting due to previous error(s)")
|
sess.fatal("aborting due to previous error(s)")
|
||||||
} else if count == 0 && compile_fail == true {
|
} else if count == 0 && compile_fail {
|
||||||
panic!("test compiled while it wasn't supposed to")
|
panic!("test compiled while it wasn't supposed to")
|
||||||
}
|
}
|
||||||
if count > 0 && error_codes.len() > 0 {
|
if count > 0 && error_codes.len() > 0 {
|
||||||
|
@ -279,7 +279,7 @@ fn runtest(test: &str, cratename: &str, cfgs: Vec<String>, libs: SearchPaths,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
if compile_fail == false {
|
if !compile_fail {
|
||||||
panic!("couldn't compile the test");
|
panic!("couldn't compile the test");
|
||||||
}
|
}
|
||||||
if error_codes.len() > 0 {
|
if error_codes.len() > 0 {
|
||||||
|
|
Loading…
Reference in New Issue