1BApplication(const char *signature) 2case 1: signature is NULL => 3 Should print error message and quit. 4case 2: signature is no valid MIME string => 5 Should print error message and quit. 6case 3: signature is a valid MIME string, but doesn't have the "application" 7 supertype => 8 Should print error message and quit. 9case 4: signature is a valid MIME string with "application" supertype, 10 but a different one than in the app attributes/resources => 11 Should print warning message and continue. 12 InitCheck() should return B_OK. 13case 5: signature is a valid MIME string with "application" supertype, 14 and the same as in the app attributes/resources => 15 Shouldn't print anything at all and continue. 16 InitCheck() should return B_OK. 17 18 19BApplication(const char *signature, status_t *error) 20cases similar to those of BApplication(const char *), if error is NULL, 21otherwise the app does not quit and error is set to the same value as 22returned by InitCheck(), which is B_BAD_VALUE on error. 23 24thread_id Run() 25case 1: launch the app two times: B_MULTIPLE_LAUNCH | B_ARGV_ONLY, 26 no command line args, send B_QUIT_REQUESTED to both of them => 27 first app: ReadyToRun(), QuitRequested() 28 second app: ReadyToRun(), QuitRequested() 29case 2: launch the app two times: B_MULTIPLE_LAUNCH | B_ARGV_ONLY, 30 command line args, send B_QUIT_REQUESTED to both of them => 31 first app: ArgvReceived(), ReadyToRun(), QuitRequested() 32 second app: ArgvReceived(), ReadyToRun(), QuitRequested() 33case 3: launch the app two times: B_MULTIPLE_LAUNCH, 34 no command line args, send B_QUIT_REQUESTED to both of them => 35 first app: ReadyToRun(), QuitRequested() 36 second app: ReadyToRun(), QuitRequested() 37case 4: launch the app two times: B_MULTIPLE_LAUNCH, 38 command line args, send B_QUIT_REQUESTED to both of them => 39 first app: ArgvReceived(), ReadyToRun(), QuitRequested() 40 second app: ArgvReceived(), ReadyToRun(), QuitRequested() 41case 5: launch the app two times: B_SINGLE_LAUNCH | B_ARGV_ONLY, 42 no command line args, send B_QUIT_REQUESTED to both of them => 43 first app: ReadyToRun(), QuitRequested() 44 second app: quits 45case 6: launch the app two times: B_SINGLE_LAUNCH | B_ARGV_ONLY, 46 command line args, send B_QUIT_REQUESTED to both of them => 47 first app: ArgvReceived(), ReadyToRun(), ArgvReceived(), 48 QuitRequested() 49 second app: quits 50case 7: launch the app two times: B_SINGLE_LAUNCH, 51 no command line args, send B_QUIT_REQUESTED to both of them => 52 first app: ReadyToRun(), QuitRequested() 53 second app: quits 54case 8: launch the app two times: B_SINGLE_LAUNCH, 55 command line args, send B_QUIT_REQUESTED to both of them => 56 first app: ArgvReceived(), ReadyToRun(), ArgvReceived(), 57 QuitRequested() 58 second app: quits 59case 9: launch two apps with the same signature: B_SINGLE_LAUNCH | B_ARGV_ONLY, 60 no command line args, send B_QUIT_REQUESTED to both of them => 61 first app: ReadyToRun(), QuitRequested() 62 second app: ReadyToRun(), QuitRequested() 63case 10:launch two apps with the same signature: B_SINGLE_LAUNCH | B_ARGV_ONLY, 64 command line args, send B_QUIT_REQUESTED to both of them => 65 first app: ArgvReceived(), ReadyToRun(), QuitRequested() 66 second app: ArgvReceived(), ReadyToRun(), QuitRequested() 67case 11:launch two apps with the same signature: B_SINGLE_LAUNCH, 68 no command line args, send B_QUIT_REQUESTED to both of them => 69 first app: ReadyToRun(), QuitRequested() 70 second app: ReadyToRun(), QuitRequested() 71case 12:launch two apps with the same signature: B_SINGLE_LAUNCH, 72 command line args, send B_QUIT_REQUESTED to both of them => 73 first app: ArgvReceived(), ReadyToRun(), QuitRequested() 74 second app: ArgvReceived(), ReadyToRun(), QuitRequested() 75case 13:launch the app two times: B_EXCLUSIVE_LAUNCH | B_ARGV_ONLY, 76 no command line args, send B_QUIT_REQUESTED to both of them => 77 first app: ReadyToRun(), QuitRequested() 78 second app: quits 79case 14:launch the app two times: B_EXCLUSIVE_LAUNCH | B_ARGV_ONLY, 80 command line args, send B_QUIT_REQUESTED to both of them => 81 first app: ArgvReceived(), ReadyToRun(), QuitRequested() 82 second app: quits 83case 15:launch the app two times: B_EXCLUSIVE_LAUNCH, 84 no command line args, send B_QUIT_REQUESTED to both of them => 85 first app: ReadyToRun(), QuitRequested() 86 second app: quits 87case 16:launch the app two times: B_EXCLUSIVE_LAUNCH, 88 command line args, send B_QUIT_REQUESTED to both of them => 89 first app: ArgvReceived(), ReadyToRun(), ArgvReceived(), 90 QuitRequested() 91 second app: quits 92case 17:launch two apps with the same signature: 93 B_EXCLUSIVE_LAUNCH | B_ARGV_ONLY, 94 no command line args, send B_QUIT_REQUESTED to both of them => 95 first app: ReadyToRun(), QuitRequested() 96 second app: quits 97case 18:launch two apps with the same signature: 98 B_EXCLUSIVE_LAUNCH | B_ARGV_ONLY, 99 command line args, send B_QUIT_REQUESTED to both of them => 100 first app: ArgvReceived(), ReadyToRun(), QuitRequested() 101 second app: quits 102case 19:launch two apps with the same signature: B_EXCLUSIVE_LAUNCH, 103 no command line args, send B_QUIT_REQUESTED to both of them => 104 first app: ReadyToRun(), QuitRequested() 105 second app: quits 106case 20:launch two apps with the same signature: B_EXCLUSIVE_LAUNCH, 107 command line args, send B_QUIT_REQUESTED to both of them => 108 first app: ArgvReceived(), ReadyToRun(), ArgvReceived(), 109 QuitRequested() 110 second app: quits 111case 21:launch the app two times: first: B_EXCLUSIVE_LAUNCH, 112 second: B_EXCLUSIVE_LAUNCH | B_ARGV_ONLY, 113 command line args, send B_QUIT_REQUESTED to both of them => 114 first app: ArgvReceived(), ReadyToRun(), ArgvReceived(), 115 QuitRequested() 116 second app: quits 117 118case 22:launch the app two times: first: B_EXCLUSIVE_LAUNCH | B_ARGV_ONLY, 119 second: B_EXCLUSIVE_LAUNCH, 120 command line args, send B_QUIT_REQUESTED to both of them => 121 first app: ArgvReceived(), ReadyToRun(), QuitRequested() 122 second app: quits 123 124void Quit() 125case 1: not running application => 126 Should delete the application object. 127case 2: running application, call from looper thread => 128 Run() should return. Should not delete the application object. 129case 3: running application, call from other thread => 130 Run() should return. Should not delete the application object. 131case 4: running application, call from other thread, but don't lock before => 132 Should print error message, but proceed anyway. Run() should return. 133 Should not delete the application object. 134 135bool QuitRequested() 136case 1: return false the first time, true the second time it is invoked => 137 Should not quit after the first time, but after the second one. 138 139