[brlcad-commits] SF.net SVN: brlcad:[33493]
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <dav...@us...> - 2009-01-08 18:06:39
|
Revision: 33493 http://brlcad.svn.sourceforge.net/brlcad/?rev=33493&view=rev Author: davidloman Date: 2009-01-08 18:06:34 +0000 (Thu, 08 Jan 2009) Log Message: ----------- Consolidated ibme/gs/ge related binary generation into src/iBME. Moved all test source files into src/test/ Modified Paths: -------------- rt^3/trunk/configure.ac rt^3/trunk/src/GeometryEngine/Makefile.am rt^3/trunk/src/GeometryService/Makefile.am rt^3/trunk/src/Makefile.am Added Paths: ----------- rt^3/trunk/src/iBME/ rt^3/trunk/src/tests/ rt^3/trunk/src/tests/netMsgSerialTest.cxx Modified: rt^3/trunk/configure.ac =================================================================== --- rt^3/trunk/configure.ac 2009-01-08 17:34:22 UTC (rev 33492) +++ rt^3/trunk/configure.ac 2009-01-08 18:06:34 UTC (rev 33493) @@ -746,6 +746,7 @@ src/date/Makefile src/GeometryEngine/Makefile src/GeometryService/Makefile + src/iBME/Makefile src/libGeometry/Makefile src/libImage/Makefile src/libNetwork/Makefile Modified: rt^3/trunk/src/GeometryEngine/Makefile.am =================================================================== --- rt^3/trunk/src/GeometryEngine/Makefile.am 2009-01-08 17:34:22 UTC (rev 33492) +++ rt^3/trunk/src/GeometryEngine/Makefile.am 2009-01-08 18:06:34 UTC (rev 33493) @@ -1,4 +1,3 @@ - lib_LTLIBRARIES = libge.la libge_la_SOURCES = \ @@ -34,12 +33,3 @@ ../lang/Object.cxx \ ../lang/RuntimeException.cxx \ ../lang/Throwable.cxx - - -bin_PROGRAMS = serialtest - -serialtest_SOURCES = \ - ../io/sstest.cxx - -serialtest_LDADD = \ - libge.la Modified: rt^3/trunk/src/GeometryService/Makefile.am =================================================================== --- rt^3/trunk/src/GeometryService/Makefile.am 2009-01-08 17:34:22 UTC (rev 33492) +++ rt^3/trunk/src/GeometryService/Makefile.am 2009-01-08 18:06:34 UTC (rev 33493) @@ -25,25 +25,3 @@ netMsg/NetMsg.cxx \ netMsg/RemHostNameSetFailMsg.cxx \ netMsg/RemHostNameSetMsg.cxx - - -bin_PROGRAMS = netMsgSerialTest - - -#gsph0_SOURCES = \ -# gsph0.cxx -# -#gsph0_LDADD = \ -# ../GeometryEngine/libge.la \ -# libgs.la - - - -netMsgSerialTest_SOURCES = \ - ../io/netMsgSerialTest.cxx - -netMsgSerialTest_LDADD = \ - ../GeometryEngine/libge.la \ - libgs.la - - Modified: rt^3/trunk/src/Makefile.am =================================================================== --- rt^3/trunk/src/Makefile.am 2009-01-08 17:34:22 UTC (rev 33492) +++ rt^3/trunk/src/Makefile.am 2009-01-08 18:06:34 UTC (rev 33493) @@ -2,6 +2,7 @@ date \ GeometryEngine \ GeometryService \ + iBME\ libUtility \ libNumeric \ libImage \ Added: rt^3/trunk/src/tests/netMsgSerialTest.cxx =================================================================== --- rt^3/trunk/src/tests/netMsgSerialTest.cxx (rev 0) +++ rt^3/trunk/src/tests/netMsgSerialTest.cxx 2009-01-08 18:06:34 UTC (rev 33493) @@ -0,0 +1,209 @@ +/* N E T M S G S E R I A L T E S T . C X X + * BRL-CAD + * + * Copyright (c) 1997-2008 United States Government as represented by + * the U.S. Army Research Laboratory. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this file; see the file named COPYING for more + * information. + */ + +/** @file netMsgSerialTest.cxx + * + * Description - Tests the serialization routines of NetMsg and its + * Subclasses. + * + * + * Author - David Loman + * + */ + +#include "GeometryService/netMsg/NetMsg.h" +#include "GeometryService/netMsg/RemHostNameSetMsg.h" +#include "GeometryService/netMsg/RemHostNameSetFailMsg.h" +#include "GeometryService/netMsg/GeometryReqMsg.h" +#include "GeometryService/netMsg/GeometryManifestMsg.h" +#include "common/array.h" + + +int main(int argc, char* argv[]) +{ + + array<uByte>* data; + + std::cout << "\n\n\n*******************\n"; + std::cout << "Testing NetMsg.cxx:\n"; + std::cout << "*******************\n"; + + NetMsg* n = new NetMsg(100, "60a03846-c39b-42e6-865f-394056a4fa04", "90645abd-3109-4538-a425-07810542cc2d"); + + std::cout << "\nOriginal Data: \n"; + n->printMe(); + + data = n->serialize(); + + std::cout << "\nIntermediate Data: \n"; + data->printMe(); + + + NetMsg* n2 = new NetMsg(data); + + std::cout << "\nResultant Data: \n"; + n2->printMe(); + std::cout << "\n"; + delete data; + delete n; + delete n2; + + + + + + std::cout << "\n\n\n*******************\n"; + std::cout << "Testing RemHostNameSetMsg.cxx:\n"; + std::cout << "*******************\n"; + + RemHostNameSetMsg* n3 = new RemHostNameSetMsg(100, "60a03846-c39b-42e6-865f-394056a4fa04", "90645abd-3109-4538-a425-07810542cc2d", "shota"); + + std::cout << "\nOriginal Data: \n"; + n3->printMe(); + + data = n3->serialize(); + + std::cout << "\nIntermediate Data: \n"; + data->printMe(); + + + RemHostNameSetMsg* n4 = new RemHostNameSetMsg(data); + + std::cout << "\nResultant Data: \n"; + n4->printMe(); + std::cout << "\n"; + delete data; + delete n3; + delete n4; + + + + + + + + + std::cout << "\n\n\n*******************\n"; + std::cout << "Testing RemHostNameSetFailMsg.cxx:\n"; + std::cout << "*******************\n"; + + RemHostNameSetFailMsg* n5 = new RemHostNameSetFailMsg(100, "60a03846-c39b-42e6-865f-394056a4fa04", "90645abd-3109-4538-a425-07810542cc2d", 150); + + std::cout << "\nOriginal Data: \n"; + n5->printMe(); + + data = n5->serialize(); + + std::cout << "\nIntermediate Data: \n"; + data->printMe(); + + + RemHostNameSetFailMsg* n6 = new RemHostNameSetFailMsg(data); + + std::cout << "\nResultant Data: \n"; + n6->printMe(); + std::cout << "\n"; + delete data; + delete n5; + delete n6; + + + + + + + + + std::cout << "\n\n\n*******************\n"; + std::cout << "Testing GeometryReqMsg.cxx:\n"; + std::cout << "*******************\n"; + + GeometryReqMsg* n7 = new GeometryReqMsg(100, "60a03846-c39b-42e6-865f-394056a4fa04", "90645abd-3109-4538-a425-07810542cc2d", 160, "50a03846-c39b-42e6-865f-394056a4f99" ); + + std::cout << "\nOriginal Data: \n"; + n7->printMe(); + + data = n7->serialize(); + + std::cout << "\nIntermediate Data: \n"; + data->printMe(); + + GeometryReqMsg* n8 = new GeometryReqMsg(data); + + std::cout << "\nResultant Data: \n"; + n8->printMe(); + std::cout << "\n"; + delete data; + delete n7; + delete n8; + + + + + + + + + std::cout << "\n\n\n*******************\n"; + std::cout << "Testing GeometryManifestMsg.cxx:\n"; + std::cout << "*******************\n"; + + GeometryManifestMsg* n9 = new GeometryManifestMsg(100, "60a03846-c39b-42e6-865f-394056a4fa04", "90645abd-3109-4538-a425-07810542cc2d"); + + n9->getItemData()->push_back("50a03846-c39b-42e6-865f-394056a0000"); + n9->getItemData()->push_back("50a03846-c39b-42e6-865f-394056a1111"); + n9->getItemData()->push_back("50a03846-c39b-42e6-865f-394056a2222"); + n9->getItemData()->push_back("50a03846-c39b-42e6-865f-394056a3333"); + n9->getItemData()->push_back("50a03846-c39b-42e6-865f-394056a4444"); + n9->getItemData()->push_back("50a03846-c39b-42e6-865f-394056a5555"); + n9->getItemData()->push_back("50a03846-c39b-42e6-865f-394056a6666"); + n9->getItemData()->push_back("50a03846-c39b-42e6-865f-394056a7777"); + n9->getItemData()->push_back("50a03846-c39b-42e6-865f-394056a8888"); + n9->getItemData()->push_back("50a03846-c39b-42e6-865f-394056a9999"); + + std::cout << "\nOriginal Data: \n"; + n9->printMe(); + + data = n9->serialize(); + + std::cout << "\nIntermediate Data: \n"; + data->printMe(); + + GeometryManifestMsg* n10 = new GeometryManifestMsg(data); + + std::cout << "\nResultant Data: \n"; + n10->printMe(); + std::cout << "\n"; + delete data; + delete n9; + delete n10; + + + + return 0; +} + +// Local Variables: *** +// mode: C++ *** +// tab-width: 8 *** +// c-basic-offset: 2 *** +// indent-tabs-mode: t *** +// End: *** +// ex: shiftwidth=2 tabstop=8 Property changes on: rt^3/trunk/src/tests/netMsgSerialTest.cxx ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + text/plain Added: svn:keywords + "Revision Date Author" Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |