Move tests to in-binary and fix link args

This commit is contained in:
Steven Fackler 2013-10-20 21:49:22 -07:00
parent 4e54c159b6
commit 448e8ebbf7
3 changed files with 5 additions and 4 deletions

2
ffi.rs
View File

@ -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)

3
lib.rs
View File

@ -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;

View File

@ -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() {