Skip to content

Commit

Permalink
Merge pull request #82 from mfpiccolo/mp-trav
Browse files Browse the repository at this point in the history
Setup Travis with test suite
  • Loading branch information
Dave Herman committed May 5, 2016
2 parents c7b26a8 + ff65d9c commit e65068e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
22 changes: 21 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,22 @@ language: rust
rust:
- stable
- beta
- nightly-2016-04-29
- nightly

env:
- CXX=g++-4.8
global:
- CXX="g++-4.8"
matrix:
- TRAVIS_NODE_VERSION="6"
- TRAVIS_NODE_VERSION="5"
- TRAVIS_NODE_VERSION="5.11"
- TRAVIS_NODE_VERSION="4.2"

install:
- . $HOME/.nvm/nvm.sh
- nvm install ${TRAVIS_NODE_VERSION}
- nvm use ${TRAVIS_NODE_VERSION}

addons:
apt:
Expand All @@ -22,3 +34,11 @@ before_install:
- source $HOME/.nvm/nvm.sh
- nvm install stable
- nvm use stable

script:
- |
(cd tests/ && npm test)
if [[ "$TRAVIS_RUST_VERSION" == nightly* ]]; then
(cd compile_tests/ && cargo test)
fi
17 changes: 9 additions & 8 deletions tests/native/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ use js::arrays::*;
use js::objects::*;

register_module!(m, {
m.export("return_js_string", return_js_string);
try!(m.export("return_js_string", return_js_string));

m.export("return_js_integer", return_js_integer);
try!(m.export("return_js_integer", return_js_integer));

m.export("return_js_array", return_js_array);
m.export("return_js_array_with_integer", return_js_array_with_integer);
m.export("return_js_array_with_string", return_js_array_with_string);
try!(m.export("return_js_array", return_js_array));
try!(m.export("return_js_array_with_integer", return_js_array_with_integer));
try!(m.export("return_js_array_with_string", return_js_array_with_string));

m.export("return_js_object", return_js_object);
m.export("return_js_object_with_integer", return_js_object_with_integer);
m.export("return_js_object_with_string", return_js_object_with_string)
try!(m.export("return_js_object", return_js_object));
try!(m.export("return_js_object_with_integer", return_js_object_with_integer));
try!(m.export("return_js_object_with_string", return_js_object_with_string));
Ok(())
});


0 comments on commit e65068e

Please sign in to comment.