From b766d584b36b78c96e9ef60ec927214c74ede4ab Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Thu, 15 Aug 2019 08:12:14 -0700 Subject: Update cc crate to 1.0.40 This change updates the cc crate to version 1.0.40. Import subrepo cc/:cc at 6ad3da7558ec3ccb4dc9c2ed1487fc139469d41e --- cc/tests/test.rs | 41 ++++++++++------------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) (limited to 'cc/tests/test.rs') 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; @@ -111,26 +110,6 @@ fn gnu_warnings_overridable() { .must_have_in_order("-Wall", "-Wno-missing-field-initializers"); } -#[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"] { @@ -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"); } -- cgit v1.2.1