michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* This test verifies that NSPR can be cleaned up and reinitialized. */ michael@0: michael@0: #include "nspr.h" michael@0: #include michael@0: michael@0: int main() michael@0: { michael@0: PRStatus rv; michael@0: michael@0: fprintf(stderr, "Init 1\n"); michael@0: PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0); michael@0: fprintf(stderr, "Cleanup 1\n"); michael@0: rv = PR_Cleanup(); michael@0: if (rv != PR_SUCCESS) { michael@0: fprintf(stderr, "FAIL\n"); michael@0: return 1; michael@0: } michael@0: michael@0: fprintf(stderr, "Init 2\n"); michael@0: PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0); michael@0: fprintf(stderr, "Cleanup 2\n"); michael@0: rv = PR_Cleanup(); michael@0: if (rv != PR_SUCCESS) { michael@0: fprintf(stderr, "FAIL\n"); michael@0: return 1; michael@0: } michael@0: michael@0: fprintf(stderr, "PASS\n"); michael@0: return 0; michael@0: }