summaryrefslogtreecommitdiff
path: root/cc/tests/test.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-08-15 08:12:14 -0700
committerDaniel Mueller <deso@posteo.net>2019-08-15 08:12:14 -0700
commitb766d584b36b78c96e9ef60ec927214c74ede4ab (patch)
treef4032b79b7a51183947e9ccd6e363fe5946dd1d3 /cc/tests/test.rs
parent155f9b7e7f36975240ef93f3daf983b228592a11 (diff)
downloadnitrocli-b766d584b36b78c96e9ef60ec927214c74ede4ab.tar.gz
nitrocli-b766d584b36b78c96e9ef60ec927214c74ede4ab.tar.bz2
Update cc crate to 1.0.40
This change updates the cc crate to version 1.0.40. Import subrepo cc/:cc at 6ad3da7558ec3ccb4dc9c2ed1487fc139469d41e
Diffstat (limited to 'cc/tests/test.rs')
-rw-r--r--cc/tests/test.rs41
1 files changed, 10 insertions, 31 deletions
diff --git a/cc/tests/test.rs b/cc/tests/test.rs
index 5147b77..74eca1e 100644
--- a/cc/tests/test.rs
+++ b/cc/tests/test.rs
@@ -1,7 +1,6 @@
extern crate cc;
extern crate tempdir;
-use std::env;
use support::Test;
mod support;
@@ -112,26 +111,6 @@ fn gnu_warnings_overridable() {
}
#[test]
-fn gnu_no_warnings_if_cflags() {
- env::set_var("CFLAGS", "-Wflag-does-not-exist");
- let test = Test::gnu();
- test.gcc().file("foo.c").compile("foo");
-
- test.cmd(0).must_not_have("-Wall").must_not_have("-Wextra");
- env::set_var("CFLAGS", "");
-}
-
-#[test]
-fn gnu_no_warnings_if_cxxflags() {
- env::set_var("CXXFLAGS", "-Wflag-does-not-exist");
- let test = Test::gnu();
- test.gcc().file("foo.c").compile("foo");
-
- test.cmd(0).must_not_have("-Wall").must_not_have("-Wextra");
- env::set_var("CXXFLAGS", "");
-}
-
-#[test]
fn gnu_x86_64() {
for vendor in &["unknown-linux-gnu", "apple-darwin"] {
let target = format!("x86_64-{}", vendor);
@@ -311,11 +290,11 @@ fn msvc_smoke() {
test.gcc().file("foo.c").compile("foo");
test.cmd(0)
- .must_have("/O2")
+ .must_have("-O2")
.must_have("foo.c")
- .must_not_have("/Z7")
- .must_have("/c")
- .must_have("/MD");
+ .must_not_have("-Z7")
+ .must_have("-c")
+ .must_have("-MD");
test.cmd(1).must_have(test.td.path().join("foo.o"));
}
@@ -324,14 +303,14 @@ fn msvc_opt_level_0() {
let test = Test::msvc();
test.gcc().opt_level(0).file("foo.c").compile("foo");
- test.cmd(0).must_not_have("/O2");
+ test.cmd(0).must_not_have("-O2");
}
#[test]
fn msvc_debug() {
let test = Test::msvc();
test.gcc().debug(true).file("foo.c").compile("foo");
- test.cmd(0).must_have("/Z7");
+ test.cmd(0).must_have("-Z7");
}
#[test]
@@ -339,7 +318,7 @@ fn msvc_include() {
let test = Test::msvc();
test.gcc().include("foo/bar").file("foo.c").compile("foo");
- test.cmd(0).must_have("/I").must_have("foo/bar");
+ test.cmd(0).must_have("-I").must_have("foo/bar");
}
#[test]
@@ -351,7 +330,7 @@ fn msvc_define() {
.file("foo.c")
.compile("foo");
- test.cmd(0).must_have("/DFOO=bar").must_have("/DBAR");
+ test.cmd(0).must_have("-DFOO=bar").must_have("-DBAR");
}
#[test]
@@ -359,7 +338,7 @@ fn msvc_static_crt() {
let test = Test::msvc();
test.gcc().static_crt(true).file("foo.c").compile("foo");
- test.cmd(0).must_have("/MT");
+ test.cmd(0).must_have("-MT");
}
#[test]
@@ -367,5 +346,5 @@ fn msvc_no_static_crt() {
let test = Test::msvc();
test.gcc().static_crt(false).file("foo.c").compile("foo");
- test.cmd(0).must_have("/MD");
+ test.cmd(0).must_have("-MD");
}