OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [language/] [cxx/] [ustl/] [current/] [tests/] [bvt25.cpp] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
// This file is part of the uSTL library, an STL implementation.
2
//
3
// Copyright (c) 2005-2009 by Mike Sharov <msharov@users.sourceforge.net>
4
// This file is free software, distributed under the MIT License.
5
 
6
#include "stdtest.h"
7
 
8
void TestFStream (void)
9
{
10
    fstream fs ("bvt/bvt25.std", ios::in | ios::nocreate);
11
    if (!fs && !(fs.open("bvt25.std", ios::in | ios::nocreate),fs))
12
        cout << "Failed to open bvt25.std" << endl;
13
    string buf;
14
    buf.resize (fs.size());
15
    if (buf.size() != 71)
16
        cout << "fstream.size() returned " << buf.size() << endl;
17
    fs.read (buf.begin(), buf.size());
18
    cout << buf;
19
    fs.close();
20
}
21
 
22
StdBvtMain (TestFStream)

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.