-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7215fc9
commit 514d0ea
Showing
6 changed files
with
32 additions
and
36 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
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 |
---|---|---|
@@ -1,17 +1,19 @@ | ||
#[tokio::test] | ||
async fn sangfor() { | ||
#[test] | ||
fn sangfor() { | ||
let nal: &dyn crate::core::nal::Nal = | ||
&crate::core::sangfor::Sangfor::new("http://1.1.1.4/ac_portal/login.php"); | ||
let config = crate::core::nal::LoginConfig { | ||
username: 2336.to_string(), | ||
password: 13141.to_string(), | ||
}; | ||
let is_ok = nal.login_net(&config).await; | ||
let is_ok = nal.login_net(&config).unwrap_or_else(|_| false); | ||
println!(" is_ok: {:?}", is_ok); | ||
assert_eq!(is_ok, true); | ||
} | ||
|
||
#[tokio::test] | ||
async fn check_net() { | ||
let is_ok = crate::core::nal::check_net().await; | ||
#[test] | ||
fn check_net() { | ||
let is_ok = crate::core::nal::check_net(); | ||
println!(" is_ok: {:?}", is_ok); | ||
assert_eq!(is_ok, true); | ||
} |
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