use super::*; #[test] fn test_transfer_precreated_port_with_owned_peer() { compile_and_create_component(" primitive port_sender(out> tx) { channel a -> b; sync put(tx, b); } primitive port_receiver(in> rx) { sync auto a = get(rx); } composite constructor() { channel a -> b; new port_sender(a); new port_receiver(b); } ", "constructor", no_args()); } #[test] fn test_transfer_precreated_port_with_foreign_peer() { compile_and_create_component(" primitive port_sender(out> tx, in to_send) { sync put(tx, to_send); } primitive port_receiver(in> rx) { sync auto a = get(rx); } composite constructor() { channel tx -> rx; channel forgotten -> to_send; new port_sender(tx, to_send); new port_receiver(rx); } ", "constructor", no_args()); } #[test] fn test_transfer_synccreated_port() { compile_and_create_component(" primitive port_sender(out> tx) { sync { channel a -> b; put(tx, b); } } primitive port_receiver(in> rx) { sync auto a = get(rx); } composite constructor() { channel a -> b; new port_sender(a); new port_receiver(b); } ", "constructor", no_args()); } #[test] fn test_transfer_precreated_port_with_owned_peer_back_and_forth() { } #[test] fn test_transfer_precreated_port_with_foreign_peer_back_and_forth() { } #[test] fn test_transfer_precreated_port_with_owned_peer_and_communication() { } #[test] fn test_transfer_precreated_port_with_foreign_peer_and_communication() { }