Files

14 lines
452 B
C

#include "agila_ports.h"
#include <assert.h>
#include <stddef.h>
int main(void) {
uint32_t h=agila_port_create(1), value=123;
assert(h!=0);
assert(agila_port_receive(h,1,NULL)==AGILA_INVALID_ARGUMENT);
assert(agila_port_send(h,1,0xffffffffu)==AGILA_OK);
assert(agila_port_receive(h,1,&value)==AGILA_OK && value==0xffffffffu);
assert(agila_port_receive(h,1,&value)==AGILA_EMPTY && value==0);
assert(agila_port_close(h,1)==AGILA_OK);
return 0;
}