Path: blob/main/crates/misc/component-async-tests/tests/scenario/yield_.rs
1693 views
use anyhow::Result;12use super::util::test_run;34// No-op function; we only test this by composing it in5// `async_yield_callee_synchronous` and `async_yield_callee_stackful`6#[allow(7dead_code,8reason = "here only to make the `assert_test_exists` macro happy"9)]10pub fn async_yield_caller() {}1112// No-op function; we only test this by composing it in13// `async_yield_callee_synchronous` and `async_yield_callee_stackful`14#[allow(15dead_code,16reason = "here only to make the `assert_test_exists` macro happy"17)]18pub fn async_yield_caller_cancel() {}1920#[tokio::test]21pub async fn async_yield_callee_synchronous() -> Result<()> {22test_run(&[23test_programs_artifacts::ASYNC_YIELD_CALLER_COMPONENT,24test_programs_artifacts::ASYNC_YIELD_CALLEE_SYNCHRONOUS_COMPONENT,25])26.await27}2829#[tokio::test]30pub async fn async_yield_callee_stackless() -> Result<()> {31test_run(&[32test_programs_artifacts::ASYNC_YIELD_CALLER_COMPONENT,33test_programs_artifacts::ASYNC_YIELD_CALLEE_STACKLESS_COMPONENT,34])35.await36}3738#[tokio::test]39pub async fn async_yield_callee_cancel_synchronous() -> Result<()> {40test_run(&[41test_programs_artifacts::ASYNC_YIELD_CALLER_CANCEL_COMPONENT,42test_programs_artifacts::ASYNC_YIELD_CALLEE_SYNCHRONOUS_COMPONENT,43])44.await45}4647#[tokio::test]48pub async fn async_yield_callee_cancel_stackless() -> Result<()> {49test_run(&[50test_programs_artifacts::ASYNC_YIELD_CALLER_CANCEL_COMPONENT,51test_programs_artifacts::ASYNC_YIELD_CALLEE_STACKLESS_COMPONENT,52])53.await54}555657