]> git.lizzy.rs Git - rust.git/commitdiff
UI test for -Z print-fuel=foo
authorAustin Hicks <camlorn@camlorn.net>
Fri, 10 Mar 2017 19:24:50 +0000 (14:24 -0500)
committerSimonas Kazlauskas <git@kazlauskas.me>
Tue, 11 Apr 2017 11:36:08 +0000 (14:36 +0300)
src/test/ui/print-fuel/print-fuel.rs [new file with mode: 0644]
src/test/ui/print-fuel/print-fuel.stdout [new file with mode: 0644]

diff --git a/src/test/ui/print-fuel/print-fuel.rs b/src/test/ui/print-fuel/print-fuel.rs
new file mode 100644 (file)
index 0000000..0d9e243
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_name="foo"]
+#![allow(dead_code)]
+
+// compile-flags: -Z print-fuel=foo
+
+struct S1(u8, u16, u8);
+struct S2(u8, u16, u8);
+struct S3(u8, u16, u8);
+
+fn main() {
+}
diff --git a/src/test/ui/print-fuel/print-fuel.stdout b/src/test/ui/print-fuel/print-fuel.stdout
new file mode 100644 (file)
index 0000000..cc88cc0
--- /dev/null
@@ -0,0 +1 @@
+Fuel used by foo: 3