nsprpub/pr/src/cplus/tests/fileio.cpp

Wed, 31 Dec 2014 06:55:46 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:46 +0100
changeset 1
ca08bd8f51b2
permissions
-rw-r--r--

Added tag TORBROWSER_REPLICA for changeset 6474c204b198

michael@0 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 /* fileio.cpp - a test program */
michael@0 7
michael@0 8 #include "rcfileio.h"
michael@0 9
michael@0 10 #include <prlog.h>
michael@0 11 #include <prprf.h>
michael@0 12
michael@0 13 #define DEFAULT_ITERATIONS 100
michael@0 14
michael@0 15 PRIntn main(PRIntn argc, char **argv)
michael@0 16 {
michael@0 17 PRStatus rv;
michael@0 18 RCFileIO fd;
michael@0 19 RCFileInfo info;
michael@0 20 rv = fd.Open("filio.dat", PR_CREATE_FILE, 0666);
michael@0 21 PR_ASSERT(PR_SUCCESS == rv);
michael@0 22 rv = fd.FileInfo(&info);
michael@0 23 PR_ASSERT(PR_SUCCESS == rv);
michael@0 24 rv = fd.Delete("filio.dat");
michael@0 25 PR_ASSERT(PR_SUCCESS == rv);
michael@0 26 fd.Close();
michael@0 27 PR_ASSERT(PR_SUCCESS == rv);
michael@0 28
michael@0 29 return 0;
michael@0 30 } /* main */
michael@0 31
michael@0 32 /* interval.cpp */
michael@0 33

mercurial