test(libSceRudp): follow the End/Terminate swap in the context query and pump tests
guest_rudp_context_queries released its context with sceRudpEnd(context) and shut the library down with sceRudpTerminate(), and guest_rudp_pump shut it down with sceRudpTerminate(), the order main had before the swap. They now call sceRudpTerminate(context) and sceRudpEnd().
This commit is contained in:
parent
4029b5d2c9
commit
ebd71eb2e7
|
|
@ -7,8 +7,8 @@ extern "C" {
|
|||
using GuestRudpEventHandler = void(APS5_VABI*)(int, int, int, void*);
|
||||
int APS5_VABI sceRudpInit_nid_postfix(void*, int);
|
||||
int APS5_VABI sceRudpCreateContext(GuestRudpEventHandler, void*, int*);
|
||||
int APS5_VABI sceRudpEnd(int);
|
||||
int APS5_VABI sceRudpTerminate();
|
||||
int APS5_VABI sceRudpTerminate(int);
|
||||
int APS5_VABI sceRudpEnd();
|
||||
int APS5_VABI sceRudpGetNumberOfPacketsToRead(int);
|
||||
int APS5_VABI sceRudpGetSizeWritable(int);
|
||||
int APS5_VABI sceRudpGetSizeReadable(int);
|
||||
|
|
@ -46,10 +46,10 @@ int main() {
|
|||
Require(sceRudpGetNumberOfPacketsToRead(context) == 0);
|
||||
Require(sceRudpGetSizeWritable(context) == notAcceptable);
|
||||
Require(sceRudpGetSizeReadable(context) == notAcceptable);
|
||||
Require(sceRudpEnd(context) == 0);
|
||||
Require(sceRudpTerminate(context) == 0);
|
||||
Require(sceRudpGetNumberOfPacketsToRead(context) == invalidContext);
|
||||
Require(sceRudpGetSizeWritable(context) == invalidContext);
|
||||
Require(sceRudpGetSizeReadable(context) == invalidContext);
|
||||
Require(sceRudpTerminate() == 0);
|
||||
Require(sceRudpEnd() == 0);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
extern "C" {
|
||||
int APS5_VABI sceRudpInit_nid_postfix(void*, int);
|
||||
int APS5_VABI sceRudpTerminate();
|
||||
int APS5_VABI sceRudpEnd();
|
||||
int APS5_VABI sceRudpProcessEvents();
|
||||
int APS5_VABI sceRudpNetFlush();
|
||||
int APS5_VABI sceRudpGetMaxSegmentSize(std::uint16_t*);
|
||||
|
|
@ -43,7 +43,7 @@ int main() {
|
|||
std::uint16_t segment[3] = {0, 0, 0x5a5a};
|
||||
CHECK(sceRudpGetMaxSegmentSize(&segment[1]) == 0);
|
||||
CHECK(segment[0] == 0 && segment[1] == 1410 && segment[2] == 0x5a5a);
|
||||
CHECK(sceRudpTerminate() == 0);
|
||||
CHECK(sceRudpEnd() == 0);
|
||||
|
||||
segmentSize = 0x5a5a;
|
||||
CHECK(sceRudpGetMaxSegmentSize(&segmentSize) == notInitialized);
|
||||
|
|
|
|||
Loading…
Reference in New Issue