152a38012SejakowatzBMessenger() 252a38012Sejakowatzcase 1: IsValid() should return false. 352a38012Sejakowatz IsTargetLocal() should return false. 452a38012Sejakowatz Target() should return NULL and NULL for looper. 552a38012Sejakowatz Team() should return -1. 652a38012Sejakowatz 752a38012SejakowatzBMessenger(const BHandler *handler, const BLooper *looper, status_t *result) 852a38012Sejakowatzcase 1: handler is NULL, looper is NULL, result is NULL => 952a38012Sejakowatz IsValid() and IsTargetLocal() should return false 1052a38012Sejakowatz Target() should return NULL and NULL for looper. 1152a38012Sejakowatz Team() should return -1. 1252a38012Sejakowatzcase 2: handler is NULL, looper is NULL, result is not NULL => 1352a38012Sejakowatz IsValid() and IsTargetLocal() should return false. 1452a38012Sejakowatz Target() should return NULL and NULL for looper. 1552a38012Sejakowatz Team() should return -1. 1652a38012Sejakowatz result is set to B_BAD_VALUE. 1752a38012Sejakowatzcase 3: handler is NULL, looper is not NULL, result is not NULL => 1852a38012Sejakowatz IsValid() and IsTargetLocal() should return true. 1952a38012Sejakowatz Target() should return NULL and the correct value for looper. 2052a38012Sejakowatz Team() should return this team. 2152a38012Sejakowatz result is set to B_OK. 2252a38012Sejakowatzcase 4: handler is not NULL, looper is NULL, result is not NULL, 2352a38012Sejakowatz handler doesn't belong to a looper => 2452a38012Sejakowatz IsValid() and IsTargetLocal() should return false. 2552a38012Sejakowatz Target() should return NULL and NULL for looper. 2652a38012Sejakowatz Team() should return -1. 2752a38012Sejakowatz result is set to B_MISMATCHED_VALUES. 2852a38012Sejakowatzcase 5: handler is not NULL, looper is NULL, result is not NULL 2952a38012Sejakowatz handler does belong to a looper => 3052a38012Sejakowatz IsValid() and IsTargetLocal() should return true. 3152a38012Sejakowatz Target() should return the correct handler and handler->Looper() 3252a38012Sejakowatz for looper. 3352a38012Sejakowatz Team() should return this team. 3452a38012Sejakowatz result is set to B_OK. 3552a38012Sejakowatzcase 6: handler is not NULL, looper is not NULL, result is not NULL 3652a38012Sejakowatz handler does belong to the looper => 3752a38012Sejakowatz IsValid() and IsTargetLocal() should return true. 3852a38012Sejakowatz Target() should return the correct handler and the correct value 3952a38012Sejakowatz for looper. 4052a38012Sejakowatz Team() should return this team. 4152a38012Sejakowatz result is set to B_OK. 4252a38012Sejakowatzcase 7: handler is not NULL, looper is not NULL, result is not NULL 4352a38012Sejakowatz handler does belong to a different looper => 4452a38012Sejakowatz IsValid() and IsTargetLocal() should return false. 4552a38012Sejakowatz Target() should return NULL and NULL for looper. 4652a38012Sejakowatz Team() should return -1. 4752a38012Sejakowatz result is set to B_MISMATCHED_VALUES. 4852a38012Sejakowatz 4952a38012SejakowatzBMessenger(const BMessenger &from) 5052a38012Sejakowatzcase 1: from is uninitialized => 5152a38012Sejakowatz IsValid() and IsTargetLocal() should return false 5252a38012Sejakowatz Target() should return NULL and NULL for looper. 5352a38012Sejakowatz Team() should return -1. 5452a38012Sejakowatzcase 2: from is properly initialized to a local target => 5552a38012Sejakowatz IsValid() and IsTargetLocal() should return true 5652a38012Sejakowatz Target() should return the same values as for from. 5752a38012Sejakowatz Team() should return this team. 5852a38012Sejakowatz 5952a38012SejakowatzBMessenger(const char *signature, team_id team, status_t *result) 6052a38012SejakowatzTODO 6152a38012Sejakowatz 62*4f139d77SIngo Weinholdbool IsTargetLocal() const 63*4f139d77SIngo Weinholdcase 1: this is uninitialized => 64*4f139d77SIngo Weinhold should return false. 65*4f139d77SIngo Weinholdcase 2: this is initialized to local target with preferred handler => 66*4f139d77SIngo Weinhold should return true. 67*4f139d77SIngo Weinholdcase 3: this is initialized to local target with specific handler => 68*4f139d77SIngo Weinhold should return true. 69*4f139d77SIngo Weinholdcase 4: this is initialized to local target with preferred handler => 70*4f139d77SIngo Weinhold should return false. 71*4f139d77SIngo Weinholdcase 5: this is initialized to remote target with specific handler => 72*4f139d77SIngo Weinhold should return false. 73*4f139d77SIngo Weinhold 74*4f139d77SIngo Weinhold 75