Replace the remaining .kry and C application sources with Ziran modules, move vendored dependencies to their current pointers, and add Ziran tests for the ported hosts and policies.
17 lines
455 B
Ziran
17 lines
455 B
Ziran
#import, file "../src/social/friend_requests.zi";
|
|
|
|
#program_export
|
|
Answer :: () -> s32 {
|
|
if PendingRequestCount("{\"incoming\":[{}, {\"name\":\"A,B\"}],\"outgoing\":[]}") != 2 {
|
|
return -1
|
|
}
|
|
if PendingRequestCount("{\"incoming\":[],\"outgoing\":[1]}") != 0 {
|
|
return -2
|
|
}
|
|
if PendingRequestCount("{\"outgoing\":[]}") != 0 ||
|
|
PendingRequestCount("{\"incoming\":[1,]}") != 0 {
|
|
return -3
|
|
}
|
|
return 42
|
|
}
|