diff --git a/code-coverage.sh b/code-coverage.sh index 2a4d747..0386f12 100755 --- a/code-coverage.sh +++ b/code-coverage.sh @@ -1,5 +1,5 @@ -CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test -grcov . --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/html -rm *.profraw +CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test --manifest-path=./stellar_rust_sdk/Cargo.toml +grcov . --binary-path ./stellar_rust_sdk/target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o ./stellar_rust_sdk/target/coverage/html +rm ./stellar_rust_sdk/*.profraw # open the coverage report in the browser -xdg-open target/coverage/html/index.html +xdg-open ./stellar_rust_sdk/target/coverage/html/index.html \ No newline at end of file diff --git a/stellar_rust_sdk/src/order_book/details_request.rs b/stellar_rust_sdk/src/order_book/details_request.rs index 1615f2e..9690ff0 100644 --- a/stellar_rust_sdk/src/order_book/details_request.rs +++ b/stellar_rust_sdk/src/order_book/details_request.rs @@ -1,5 +1,4 @@ -use crate::{models::Request}; - +use crate::models::Request; pub struct SellingAsset(AssetType); pub struct NoSellingAsset; pub struct BuyingAsset(AssetType); @@ -157,7 +156,7 @@ impl Request for DetailsRequest { mod tests { use crate::models::Request; - use crate::order_book::prelude::{Asset, AssetType, DetailsRequest}; + use super::{Asset, AssetType, DetailsRequest}; #[test] fn test_details_request() { diff --git a/stellar_rust_sdk/src/order_book/mod.rs b/stellar_rust_sdk/src/order_book/mod.rs index aac907a..0499655 100644 --- a/stellar_rust_sdk/src/order_book/mod.rs +++ b/stellar_rust_sdk/src/order_book/mod.rs @@ -14,9 +14,9 @@ pub mod tests { #[tokio::test] async fn get_order_bookdetails() { - const BIDS_N: &u32 = &250000; - const BIDS_D: &u32 = &21749; - const BIDS_PRICE: &str = "11.4947814"; + const BIDS_N: &u32 = &1000; + const BIDS_D: &u32 = &87; + const BIDS_PRICE: &str = "11.4942529"; const BIDS_AMOUNT: &str = "2556626.8467920"; const ASKS_N: &u32 = &2299;