Test that Symbol is neither Send nor Sync
diff --git a/tests/compile-fail/symbol_send.rs b/tests/compile-fail/symbol_send.rs
new file mode 100644
index 0000000..64727fc
--- /dev/null
+++ b/tests/compile-fail/symbol_send.rs
@@ -0,0 +1,9 @@
+extern crate proc_macro2;
+
+use proc_macro2::Symbol;
+
+fn assert_send<T: Send>() {}
+
+fn main() {
+    assert_send::<Symbol>(); //~ the trait bound `*const (): std::marker::Send` is not satisfied in `proc_macro2::Symbol`
+}
diff --git a/tests/compile-fail/symbol_sync.rs b/tests/compile-fail/symbol_sync.rs
new file mode 100644
index 0000000..ede06d1
--- /dev/null
+++ b/tests/compile-fail/symbol_sync.rs
@@ -0,0 +1,9 @@
+extern crate proc_macro2;
+
+use proc_macro2::Symbol;
+
+fn assert_sync<T: Sync>() {}
+
+fn main() {
+    assert_sync::<Symbol>(); //~ the trait bound `*const (): std::marker::Sync` is not satisfied in `proc_macro2::Symbol`
+}
diff --git a/tests/compiletest.rs b/tests/compiletest.rs
new file mode 100644
index 0000000..b1055ce
--- /dev/null
+++ b/tests/compiletest.rs
@@ -0,0 +1,14 @@
+extern crate compiletest_rs as compiletest;
+
+fn run_mode(mode: &'static str) {
+    let mut config = compiletest::default_config();
+    config.mode = mode.parse().expect("invalid mode");
+    config.target_rustcflags = Some("-L target/debug/deps".to_owned());
+    config.src_base = format!("tests/{}", mode).into();
+    compiletest::run_tests(&config);
+}
+
+#[test]
+fn compile_fail() {
+    run_mode("compile-fail");
+}