-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed supply casting issue in smoke tests
- Loading branch information
1 parent
2c5e0ba
commit 5e03b9a
Showing
11 changed files
with
60 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
use libra_query::query_type::QueryType; | ||
use libra_smoke_tests::libra_smoke::LibraSmoke; | ||
|
||
/// Testing the query library | ||
#[tokio::test(flavor = "multi_thread", worker_threads = 1)] | ||
async fn libra_view_test() { | ||
let mut s = LibraSmoke::new(None).await.expect("could not start swarm"); | ||
|
||
let c = s.client(); | ||
|
||
let q = QueryType::View { | ||
function_id: "0x1::gas_coin::supply".to_string(), | ||
type_args: None, | ||
args: None, | ||
}; | ||
match q.query_to_json(Some(c.to_owned())).await { | ||
Ok(v) => { | ||
println!("v: {:?}", v); | ||
// let b: LibraBalanceDisplay = serde_json::from_value(v).unwrap(); | ||
// assert!(b.unlocked == 10.0); | ||
// assert!(b.total == 10.0); | ||
} | ||
Err(e) => { | ||
println!("e: {:?}", e); | ||
panic!("nothing returned from query"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters