Add .travis.yml, update tests and Cargo.toml for upstream changes

This commit is contained in:
Andrew Poelstra 2014-08-17 18:55:07 -07:00
parent bf011f956e
commit 79815e225b
4 changed files with 20 additions and 4 deletions

15
.travis.yml Normal file
View File

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

View File

@ -6,6 +6,6 @@ authors = [
"Dawid Ciężarkiewicz <dpc@ucore.info>"
]
[[lib]]
[lib]
name = "bitcoin-secp256k1-rs"
path = "src/secp256k1.rs"

View File

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

View File

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