From 79815e225b378532d022db0353f89de9b2769ac1 Mon Sep 17 00:00:00 2001 From: Andrew Poelstra Date: Sun, 17 Aug 2014 18:55:07 -0700 Subject: [PATCH] Add .travis.yml, update tests and Cargo.toml for upstream changes --- .travis.yml | 15 +++++++++++++++ Cargo.toml | 2 +- src/key.rs | 2 +- src/secp256k1.rs | 5 +++-- 4 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a2a567d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ + +before_install: + - sudo add-apt-repository --yes ppa:hansjorg/rust + - sudo add-apt-repository --yes ppa:cmrx64/cargo + - sudo apt-get update -qq +install: + - sudo apt-get install -qq rust-nightly cargo + - git clone https://github.com/sipa/secp256k1.git + - cd secp256k1 + - ./autogen.sh && ./configure && make && sudo make install + - sudo ldconfig /usr/local/lib +script: + - cargo build + - cargo test + diff --git a/Cargo.toml b/Cargo.toml index 8dd28fb..c0ff678 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,6 @@ authors = [ "Dawid Ciężarkiewicz " ] -[[lib]] +[lib] name = "bitcoin-secp256k1-rs" path = "src/secp256k1.rs" diff --git a/src/key.rs b/src/key.rs index 74925f7..62da095 100644 --- a/src/key.rs +++ b/src/key.rs @@ -288,7 +288,7 @@ mod test { use std::rand::task_rng; use super::super::{Secp256k1, InvalidNonce, InvalidPublicKey, InvalidSecretKey}; - use super::*; + use super::{Nonce, PublicKey, SecretKey}; #[test] fn nonce_from_slice() { diff --git a/src/secp256k1.rs b/src/secp256k1.rs index ab0f25e..2e7393d 100644 --- a/src/secp256k1.rs +++ b/src/secp256k1.rs @@ -224,12 +224,13 @@ impl Secp256k1 { #[cfg(test)] mod test { - use std::rand; use std::rand::Rng; - use super::*; use key::PublicKey; + use super::Secp256k1; + use super::{InvalidPublicKey, IncorrectSignature, InvalidSignature}; + #[test] fn invalid_pubkey() { let s = Secp256k1::new();