aboutsummaryrefslogtreecommitdiff
path: root/cc/tests/test.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-11-01 07:45:35 -0700
committerDaniel Mueller <deso@posteo.net>2019-11-01 07:45:35 -0700
commit9091de47826b82ce357c77090f35e3faaf22091a (patch)
treed6e55728a7136c809b5b284e61a27f38d6a079ab /cc/tests/test.rs
parent49be10a8179165d24bbb8eb3490c4ca6f94b42c4 (diff)
downloadnitrocli-9091de47826b82ce357c77090f35e3faaf22091a.tar.gz
nitrocli-9091de47826b82ce357c77090f35e3faaf22091a.tar.bz2
Update cc crate to 1.0.48
This change updates the cc crate to version 1.0.48. Import subrepo cc/:cc at be9f2c1ae05b336aa3d07a4cbefdc1d88a3d8a91
Diffstat (limited to 'cc/tests/test.rs')
-rw-r--r--cc/tests/test.rs37
1 files changed, 32 insertions, 5 deletions
diff --git a/cc/tests/test.rs b/cc/tests/test.rs
index 74eca1e..def11f0 100644
--- a/cc/tests/test.rs
+++ b/cc/tests/test.rs
@@ -1,7 +1,4 @@
-extern crate cc;
-extern crate tempdir;
-
-use support::Test;
+use crate::support::Test;
mod support;
@@ -42,10 +39,40 @@ fn gnu_opt_level_s() {
}
#[test]
-fn gnu_debug() {
+fn gnu_debug_fp_auto() {
let test = Test::gnu();
test.gcc().debug(true).file("foo.c").compile("foo");
test.cmd(0).must_have("-g");
+ test.cmd(0).must_have("-fno-omit-frame-pointer");
+}
+
+#[test]
+fn gnu_debug_fp() {
+ let test = Test::gnu();
+ test.gcc().debug(true).file("foo.c").compile("foo");
+ test.cmd(0).must_have("-g");
+ test.cmd(0).must_have("-fno-omit-frame-pointer");
+}
+
+#[test]
+fn gnu_debug_nofp() {
+ let test = Test::gnu();
+ test.gcc()
+ .debug(true)
+ .force_frame_pointer(false)
+ .file("foo.c")
+ .compile("foo");
+ test.cmd(0).must_have("-g");
+ test.cmd(0).must_not_have("-fno-omit-frame-pointer");
+
+ let test = Test::gnu();
+ test.gcc()
+ .force_frame_pointer(false)
+ .debug(true)
+ .file("foo.c")
+ .compile("foo");
+ test.cmd(0).must_have("-g");
+ test.cmd(0).must_not_have("-fno-omit-frame-pointer");
}
#[test]