diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-02 21:01:38 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-02 21:01:38 +0100 |
commit | f7d30133221896638f7bf4f66c504255c4b14f48 (patch) | |
tree | 5f3e07a049f388a3a309a615b8884318f6668a98 /nsprpub/pr/tests/dceemu.c | |
parent | 26b297510a11758727438df4669357a2a2bc42ce (diff) | |
download | UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.gz UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.lz UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.xz UXP-f7d30133221896638f7bf4f66c504255c4b14f48.zip |
Issue #1338 - Part 1: Update NSPR to 4.24
Diffstat (limited to 'nsprpub/pr/tests/dceemu.c')
-rw-r--r-- | nsprpub/pr/tests/dceemu.c | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/nsprpub/pr/tests/dceemu.c b/nsprpub/pr/tests/dceemu.c index 99fd6cb7c..2b1d0901a 100644 --- a/nsprpub/pr/tests/dceemu.c +++ b/nsprpub/pr/tests/dceemu.c @@ -9,8 +9,8 @@ ** ** Modification History: ** 14-May-97 AGarcia- Converted the test to accomodate the debug_mode flag. -** The debug mode will print all of the printfs associated with this test. -** The regress mode will be the default mode. Since the regress tool limits +** The debug mode will print all of the printfs associated with this test. +** The regress mode will be the default mode. Since the regress tool limits ** the output to a one line status:PASS or FAIL,all of the printf statements ** have been handled with an if (debug_mode) statement. ** 04-June-97 AGarcia removed the Test_Result function. Regress tool has been updated to @@ -41,38 +41,54 @@ static PRIntn prmain(PRIntn argc, char **argv) rv = PRP_TryLock(ml); PR_ASSERT(PR_SUCCESS == rv); - if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1; - + if ((rv != PR_SUCCESS) & (!debug_mode)) { + failed_already=1; + } + rv = PRP_TryLock(ml); PR_ASSERT(PR_FAILURE == rv); - if ((rv != PR_FAILURE) & (!debug_mode)) failed_already=1; + if ((rv != PR_FAILURE) & (!debug_mode)) { + failed_already=1; + } rv = PRP_NakedNotify(cv); PR_ASSERT(PR_SUCCESS == rv); - if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1; + if ((rv != PR_SUCCESS) & (!debug_mode)) { + failed_already=1; + } rv = PRP_NakedBroadcast(cv); PR_ASSERT(PR_SUCCESS == rv); - if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1; + if ((rv != PR_SUCCESS) & (!debug_mode)) { + failed_already=1; + } rv = PRP_NakedWait(cv, ml, tenmsecs); PR_ASSERT(PR_SUCCESS == rv); - if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1; + if ((rv != PR_SUCCESS) & (!debug_mode)) { + failed_already=1; + } + + PR_Unlock(ml); - PR_Unlock(ml); - rv = PRP_NakedNotify(cv); PR_ASSERT(PR_SUCCESS == rv); - if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1; + if ((rv != PR_SUCCESS) & (!debug_mode)) { + failed_already=1; + } rv = PRP_NakedBroadcast(cv); PR_ASSERT(PR_SUCCESS == rv); - if ((rv != PR_SUCCESS) & (!debug_mode)) failed_already=1; + if ((rv != PR_SUCCESS) & (!debug_mode)) { + failed_already=1; + } PRP_DestroyNakedCondVar(cv); PR_DestroyLock(ml); - if (debug_mode) printf("Test succeeded\n"); + if (debug_mode) { + printf("Test succeeded\n"); + } return 0; @@ -81,10 +97,12 @@ static PRIntn prmain(PRIntn argc, char **argv) int main(int argc, char **argv) { PR_Initialize(prmain, argc, argv, 0); - if(failed_already) + if(failed_already) { return 1; - else + } + else { return 0; + } } /* main */ |