Skip to content

Commit

Permalink
Run build and tests for no_std in Travis.
Browse files Browse the repository at this point in the history
There are no tests for no_std mode yet.
  • Loading branch information
wildarch committed Mar 12, 2019
1 parent a211538 commit 602b8d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ tokamak.toml
.idea
*.iml
examples/ferris.cbor
.cargo/config
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ matrix:
sudo: false
before_script:
- rustup component add rustfmt
- rustup target add thumbv7em-none-eabihf # Any target that does not have a standard library will do
script:
- cargo fmt --all -- --check
- cargo build
- cargo test
- cargo build --no-default-features --target thumbv7em-none-eabihf # Test we can build a platform that does not have std.
- cargo test --no-default-features --lib --tests # Run no_std tests
3 changes: 1 addition & 2 deletions tests/ser.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use std::collections::BTreeMap;

#[cfg(feature = "std")]
mod std_tests {
use serde::Serializer;
use serde_bytes::{ByteBuf, Bytes};
use serde_cbor::ser;
use serde_cbor::{from_slice, to_vec};
use std::collections::BTreeMap;

#[test]
fn test_string() {
Expand Down

0 comments on commit 602b8d9

Please sign in to comment.