summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Kulp <darren@kulp.ch>2020-06-29 19:50:12 -0700
committerEmilio Cobos Álvarez <emilio@crisal.io>2020-07-01 13:30:52 +0200
commiteab1137ea98c531cc079174a3a8bec1106ceaacf (patch)
treeef66b751ade95d39f9386c1f81a4834262650ee8
parentd4c3d4c5ffab9a9a65545bc1bb8ab06c771d5c81 (diff)
Introduce expectation test for operator names
-rw-r--r--tests/expectations/tests/operator.rs16
-rw-r--r--tests/headers/operator.hpp5
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/expectations/tests/operator.rs b/tests/expectations/tests/operator.rs
new file mode 100644
index 00000000..5128226d
--- /dev/null
+++ b/tests/expectations/tests/operator.rs
@@ -0,0 +1,16 @@
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
+
+extern "C" {
+ #[link_name = "\u{1}_Z20operator_informationv"]
+ pub fn operator_information() -> ::std::os::raw::c_int;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct Foo {
+ _unused: [u8; 0],
+}
diff --git a/tests/headers/operator.hpp b/tests/headers/operator.hpp
new file mode 100644
index 00000000..186f1fe6
--- /dev/null
+++ b/tests/headers/operator.hpp
@@ -0,0 +1,5 @@
+int operator_information(void);
+
+class Foo;
+int operator<<(const Foo&, int);
+