chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

40
vendor/tokio/tests/time_wasm.rs vendored Normal file
View File

@@ -0,0 +1,40 @@
#![warn(rust_2018_idioms)]
#![cfg(all(target_arch = "wasm32", not(target_os = "wasi")))]
use wasm_bindgen_test::wasm_bindgen_test;
#[wasm_bindgen_test]
#[should_panic]
fn instant_now_panics() {
let _ = tokio::time::Instant::now();
}
#[cfg(all(feature = "rt", not(feature = "time")))]
#[wasm_bindgen_test]
fn runtime_without_time_does_not_panic() {
let rt = tokio::runtime::Builder::new_current_thread()
.build()
.unwrap();
rt.block_on(async {});
}
#[cfg(all(feature = "rt", feature = "time"))]
#[wasm_bindgen_test]
#[should_panic] // should remove this once time is supported
fn runtime_with_time_does_not_panic() {
let rt = tokio::runtime::Builder::new_current_thread()
.build()
.unwrap();
rt.block_on(async {});
}
#[cfg(all(feature = "rt", feature = "time"))]
#[wasm_bindgen_test]
#[should_panic]
fn sleep_panics_on_unknown_unknown() {
let rt = tokio::runtime::Builder::new_current_thread()
.enable_time()
.build()
.unwrap();
rt.block_on(async { tokio::time::sleep(core::time::Duration::from_millis(1)).await });
}