From: Christian P. <cp...@us...> - 2004-12-30 17:18:35
|
Update of /cvsroot/pclasses/pclasses2/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32448/test Modified Files: Makefile.am Added Files: IOTest.cpp Log Message: Added IOTest --- NEW FILE: IOTest.cpp --- /*************************************************************************** * Copyright (C) 2004 by Christian Prochnow * * cp...@se... * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * * published by the Free Software Foundation; either version 2 of the * * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "Test.h" #include "pclasses/IO/IOStream.h" #include "pclasses/System/File.h" namespace P { using System::File; class FileTest: public UnitTest { public: void run() throw() { File file("pclasses_file_test.tmp", File::Write); P_TEST(file.write("test", 4) == 4); P_TEST(file.size() == 4); P_TEST(file.seek(0, File::SeekSet) == 0); //@fixme .. wtf ? why is errno==EBADF ? char tmp[4]; P_TEST(file.read(tmp, 4) == 4); } }; } int main(int argc, char* argv[]) { P::FileTest ft; ft.run(); return 0; } Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/test/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- Makefile.am 22 Dec 2004 17:54:37 -0000 1.1.1.1 +++ Makefile.am 30 Dec 2004 17:18:26 -0000 1.2 @@ -4,7 +4,8 @@ PtrTest_SOURCES = PtrTest.cpp PtrTest_LDADD = $(top_builddir)/src/System/libpclasses_system.la $(top_builddir)/src/libpclasses.la noinst_HEADERS = Test.h -noinst_PROGRAMS = QueueTest StackTest IntTypeTest ListTest ThreadTest +noinst_PROGRAMS = QueueTest StackTest IntTypeTest ListTest ThreadTest \ + StringTest IOTest QueueTest_SOURCES = QueueTest.cpp QueueTest_LDADD = $(top_builddir)/src/libpclasses.la StackTest_SOURCES = StackTest.cpp @@ -16,3 +17,10 @@ ThreadTest_SOURCES = ThreadTest.cpp ThreadTest_LDADD = $(top_builddir)/src/System/libpclasses_system.la\ $(top_builddir)/src/libpclasses.la +StringTest_SOURCES = StringTest.cpp +StringTest_LDADD = $(top_builddir)/src/Unicode/libpclasses_unicode.la\ + $(top_builddir)/src/libpclasses.la +IOTest_SOURCES = IOTest.cpp +IOTest_LDADD = $(top_builddir)/src/System/libpclasses_system.la\ + $(top_builddir)/src/IO/libpclasses_io.la\ + $(top_builddir)/src/libpclasses.la |