aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2013-10-20 21:49:22 -0700
committerSteven Fackler <[email protected]>2013-10-20 21:49:22 -0700
commit448e8ebbf7062c434c7964a6a392ade7c03a1c6f (patch)
treea9e6dfb30ec3749a9955501c41f9daad749909f2
parentRemove folder indirection (diff)
downloadrust-openssl-448e8ebbf7062c434c7964a6a392ade7c03a1c6f.tar.xz
rust-openssl-448e8ebbf7062c434c7964a6a392ade7c03a1c6f.zip
Move tests to in-binary and fix link args
-rw-r--r--ffi.rs2
-rw-r--r--lib.rs3
-rw-r--r--tests.rs (renamed from test.rs)4
3 files changed, 5 insertions, 4 deletions
diff --git a/ffi.rs b/ffi.rs
index 6c8d5bb1..e63c63a1 100644
--- a/ffi.rs
+++ b/ffi.rs
@@ -23,7 +23,7 @@ pub static SSL_ERROR_WANT_ACCEPT: c_int = 8;
pub static SSL_VERIFY_NONE: c_int = 0;
pub static SSL_VERIFY_PEER: c_int = 1;
-#[link_args = "-lssl"]
+#[link_args = "-lssl -lcrypto"]
extern "C" { }
externfn!(fn ERR_get_error() -> c_ulong)
diff --git a/lib.rs b/lib.rs
index 8acf5940..fdf827ca 100644
--- a/lib.rs
+++ b/lib.rs
@@ -9,6 +9,9 @@ use std::libc::{c_int, c_void};
mod ffi;
+#[cfg(test)]
+mod tests;
+
static mut STARTED_INIT: AtomicBool = INIT_ATOMIC_BOOL;
static mut FINISHED_INIT: AtomicBool = INIT_ATOMIC_BOOL;
diff --git a/test.rs b/tests.rs
index 557f6dec..639ce1b1 100644
--- a/test.rs
+++ b/tests.rs
@@ -1,11 +1,9 @@
-extern mod ssl;
-
use std::rt::io::Writer;
use std::rt::io::extensions::ReaderUtil;
use std::rt::io::net::tcp::TcpStream;
use std::str;
-use ssl::{Sslv23, SslCtx, SslStream, SslVerifyPeer};
+use super::{Sslv23, SslCtx, SslStream, SslVerifyPeer};
#[test]
fn test_new_ctx() {