Add an epoll_data_t test for the u32 member

This commit is contained in:
R. Tyler Croy 2011-02-12 13:29:33 -08:00
parent d4a9b19359
commit 39d736735a
2 changed files with 20 additions and 0 deletions

View File

@ -24,7 +24,10 @@ procedure Epoll.Test is
end Passed;
function Fd_Of_One return Epoll_Data;
function U32_Of_Two return Epoll_Data;
pragma Import (C, Fd_Of_One, "fd_of_one");
pragma Import (C, U32_Of_Two, "u32_of_two");
begin
Put_Line(">>> Starting tests of epoll_data");
New_Line;
@ -40,4 +43,15 @@ begin
end Fd_Test;
Passed;
Start ("U32_Test");
U32_Test:
declare
Data : Epoll_Data := U32_Of_Two;
begin
if Data.u32 /= 2 then
Failed;
end if;
end U32_Test;
Passed;
end Epoll.Test;

View File

@ -8,3 +8,9 @@ epoll_data_t fd_of_one() {
return rc;
}
epoll_data_t u32_of_two() {
epoll_data_t rc;
rc.u32 = 2;
return rc;
}