Changeset e138de for src/unittests


Ignore:
Timestamp:
Nov 4, 2009, 7:56:04 PM (15 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
1614174, e5ad5c
Parents:
7326b2
Message:

Huge change from ofstream * (const) out --> Log().

  • first shift was done via regular expressions
  • then via error messages from the code
  • note that class atom, class element and class molecule kept in parts their output stream, was they print to file.
  • make check runs fine
  • MISSING: Verbosity is not fixed for everything (i.e. if no endl; is present and next has Verbose(0) ...)

Signed-off-by: Frederik Heber <heber@…>

Location:
src/unittests
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • src/unittests/ActOnAllUnitTest.cpp

    r7326b2 re138de  
    1515#include "ActOnAllUnitTest.hpp"
    1616#include "memoryallocator.hpp"
     17#include "vector.hpp"
    1718
    1819/********************************************** Test classes **************************************/
  • src/unittests/AnalysisCorrelationToPointUnitTest.cpp

    r7326b2 re138de  
    8282
    8383  // init maps
    84   pointmap = CorrelationToPoint( (ofstream *)&cout, (MoleculeListClass * const)TestList, (const element * const)hydrogen, (const Vector *)point );
     84  pointmap = CorrelationToPoint( (MoleculeListClass * const)TestList, (const element * const)hydrogen, (const Vector *)point );
    8585  binmap = NULL;
    8686
     
    115115  BinPairMap::iterator tester;
    116116  // put pair correlation into bins and check with no range
    117   binmap = BinData( (ofstream *)&cout, pointmap, 0.5, 0., 0. );
     117  binmap = BinData( pointmap, 0.5, 0., 0. );
    118118  CPPUNIT_ASSERT_EQUAL( (size_t)2, binmap->size() );
    119   //OutputCorrelation ( (ofstream *)&cout, binmap );
     119  //OutputCorrelation ( binmap );
    120120  tester = binmap->begin();
    121121  CPPUNIT_ASSERT_EQUAL( 1., tester->first );
     
    128128  BinPairMap::iterator tester;
    129129  // ... and check with [0., 2.] range
    130   binmap = BinData( (ofstream *)&cout, pointmap, 0.5, 0., 2. );
     130  binmap = BinData( pointmap, 0.5, 0., 2. );
    131131  CPPUNIT_ASSERT_EQUAL( (size_t)5, binmap->size() );
    132   //OutputCorrelation ( (ofstream *)&cout, binmap );
     132  //OutputCorrelation ( binmap );
    133133  tester = binmap->begin();
    134134  CPPUNIT_ASSERT_EQUAL( 0., tester->first );
  • src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp

    r7326b2 re138de  
    8585  // init tesselation and linked cell
    8686  Surface = new Tesselation;
    87   FindNonConvexBorder((ofstream *)&cerr, TestMolecule, Surface, (const LinkedCell *&)LC, 2.5, NULL);
     87  FindNonConvexBorder(TestMolecule, Surface, (const LinkedCell *&)LC, 2.5, NULL);
    8888  LC = new LinkedCell(TestMolecule, 5.);
    8989  CPPUNIT_ASSERT_EQUAL( (size_t)4, Surface->PointsOnBoundary.size() );
     
    137137{
    138138  // do the pair correlation
    139   surfacemap = CorrelationToSurface( (ofstream *)&cout, TestList, hydrogen, Surface, LC );
     139  surfacemap = CorrelationToSurface( TestList, hydrogen, Surface, LC );
    140140  CPPUNIT_ASSERT( surfacemap != NULL );
    141141  CPPUNIT_ASSERT_EQUAL( (size_t)4, surfacemap->size() );
     
    145145{
    146146  BinPairMap::iterator tester;
    147   surfacemap = CorrelationToSurface( (ofstream *)&cout, TestList, hydrogen, Surface, LC );
     147  surfacemap = CorrelationToSurface( TestList, hydrogen, Surface, LC );
    148148  // put pair correlation into bins and check with no range
    149   binmap = BinData( (ofstream *)&cout, surfacemap, 0.5, 0., 0. );
     149  binmap = BinData( surfacemap, 0.5, 0., 0. );
    150150  CPPUNIT_ASSERT_EQUAL( (size_t)1, binmap->size() );
    151   //OutputCorrelation ( (ofstream *)&cout, binmap );
     151  //OutputCorrelation ( binmap );
    152152  tester = binmap->begin();
    153153  CPPUNIT_ASSERT_EQUAL( 0., tester->first );
     
    159159{
    160160  BinPairMap::iterator tester;
    161   surfacemap = CorrelationToSurface( (ofstream *)&cout, TestList, hydrogen, Surface, LC );
     161  surfacemap = CorrelationToSurface( TestList, hydrogen, Surface, LC );
    162162  // ... and check with [0., 2.] range
    163   binmap = BinData( (ofstream *)&cout, surfacemap, 0.5, 0., 2. );
     163  binmap = BinData( surfacemap, 0.5, 0., 2. );
    164164  CPPUNIT_ASSERT_EQUAL( (size_t)5, binmap->size() );
    165   //OutputCorrelation ( (ofstream *)&cout, binmap );
     165  //OutputCorrelation ( binmap );
    166166  tester = binmap->begin();
    167167  CPPUNIT_ASSERT_EQUAL( 0., tester->first );
     
    176176{
    177177  BinPairMap::iterator tester;
    178   surfacemap = CorrelationToSurface( (ofstream *)&cout, TestList, carbon, Surface, LC );
     178  surfacemap = CorrelationToSurface( TestList, carbon, Surface, LC );
    179179  // put pair correlation into bins and check with no range
    180   binmap = BinData( (ofstream *)&cout, surfacemap, 0.5, 0., 0. );
     180  binmap = BinData( surfacemap, 0.5, 0., 0. );
    181181  CPPUNIT_ASSERT_EQUAL( (size_t)2, binmap->size() );
    182182  OutputCorrelation ( (ofstream *)&cout, binmap );
     
    194194{
    195195  BinPairMap::iterator tester;
    196   surfacemap = CorrelationToSurface( (ofstream *)&cout, TestList, carbon, Surface, LC );
     196  surfacemap = CorrelationToSurface( TestList, carbon, Surface, LC );
    197197  // ... and check with [0., 2.] range
    198   binmap = BinData( (ofstream *)&cout, surfacemap, 0.5, -2., 4. );
     198  binmap = BinData( surfacemap, 0.5, -2., 4. );
    199199  CPPUNIT_ASSERT_EQUAL( (size_t)13, binmap->size() );
    200200  OutputCorrelation ( (ofstream *)&cout, binmap );
  • src/unittests/AnalysisPairCorrelationUnitTest.cpp

    r7326b2 re138de  
    7878
    7979  // init maps
    80   correlationmap = PairCorrelation( (ofstream *)&cout, TestList, hydrogen, hydrogen );
     80  correlationmap = PairCorrelation( TestList, hydrogen, hydrogen );
    8181  binmap = NULL;
    8282
     
    109109  BinPairMap::iterator tester;
    110110  // put pair correlation into bins and check with no range
    111   binmap = BinData( (ofstream *)&cout, correlationmap, 0.5, 0., 0. );
     111  binmap = BinData( correlationmap, 0.5, 0., 0. );
    112112  CPPUNIT_ASSERT_EQUAL( (size_t)1, binmap->size() );
    113   //OutputCorrelation ( (ofstream *)&cout, binmap );
     113  //OutputCorrelation ( binmap );
    114114  tester = binmap->begin();
    115115  CPPUNIT_ASSERT_EQUAL( sqrt(2.), tester->first );
     
    121121  BinPairMap::iterator tester;
    122122  // ... and check with [0., 2.] range
    123   binmap = BinData( (ofstream *)&cout, correlationmap, 0.5, 0., 2. );
     123  binmap = BinData( correlationmap, 0.5, 0., 2. );
    124124  CPPUNIT_ASSERT_EQUAL( (size_t)5, binmap->size() );
    125   //OutputCorrelation ( (ofstream *)&cout, binmap );
     125  //OutputCorrelation ( binmap );
    126126  tester = binmap->begin();
    127127  CPPUNIT_ASSERT_EQUAL( 0., tester->first );
  • src/unittests/Makefile.am

    r7326b2 re138de  
    88noinst_PROGRAMS = $(TESTS)
    99
    10 ActOnAllUnitTest_SOURCES = ../test/ActOnAllTest.hpp ActOnAllUnitTest.cpp ActOnAllUnitTest.hpp memoryallocator.hpp
     10ActOnAllUnitTest_SOURCES = ../test/ActOnAllTest.hpp ActOnAllUnitTest.cpp ActOnAllUnitTest.hpp
     11ActOnAllUnitTest_LDADD = ../libmolecuilder.a
    1112
    1213AnalysisCorrelationToPointUnitTest_SOURCES = analysis_correlation.hpp AnalysisCorrelationToPointUnitTest.cpp AnalysisCorrelationToPointUnitTest.hpp
     
    2829LogUnitTest_LDADD = ../libmolecuilder.a
    2930
    30 MemoryAllocatorUnitTest_SOURCES = defs.hpp ../helpers.cpp ../helpers.hpp memoryallocatorunittest.cpp memoryallocatorunittest.hpp memoryallocator.hpp ../memoryusageobserver.cpp memoryusageobserver.hpp ../verbose.cpp verbose.hpp
     31MemoryAllocatorUnitTest_SOURCES = memoryallocatorunittest.cpp memoryallocatorunittest.hpp
     32MemoryAllocatorUnitTest_LDADD = ../libmolecuilder.a
    3133
    32 MemoryUsageObserverUnitTest_SOURCES = defs.hpp helpers.hpp memoryusageobserverunittest.cpp memoryusageobserverunittest.hpp memoryusageobserver.hpp verbose.hpp
     34MemoryUsageObserverUnitTest_SOURCES = memoryusageobserverunittest.cpp memoryusageobserverunittest.hpp
     35MemoryUsageObserverUnitTest_LDADD = ../libmolecuilder.a
    3336
    34 StackClassUnitTest_SOURCES = memoryallocator.hpp stackclass.hpp stackclassunittest.cpp stackclassunittest.hpp
     37StackClassUnitTest_SOURCES = stackclassunittest.cpp stackclassunittest.hpp
     38StackClassUnitTest_LDADD = ../libmolecuilder.a
    3539
    36 VectorUnitTest_SOURCES = defs.hpp ../helpers.cpp helpers.hpp ../leastsquaremin.cpp leastsquaremin.hpp memoryallocator.hpp memoryusageobserver.hpp ../memoryusageobserver.cpp vectorunittest.cpp vectorunittest.hpp vector.hpp ../vector.cpp verbose.hpp ../verbose.cpp
     40VectorUnitTest_SOURCES = vectorunittest.cpp vectorunittest.hpp
     41VectorUnitTest_LDADD = ../libmolecuilder.a
    3742
    3843
  • src/unittests/bondgraphunittest.cpp

    r7326b2 re138de  
    104104void BondGraphTest::LoadTableTest()
    105105{
    106   CPPUNIT_ASSERT_EQUAL( true , BG->LoadBondLengthTable((ofstream *)&cout, *filename) );
     106  CPPUNIT_ASSERT_EQUAL( true , BG->LoadBondLengthTable(*filename) );
    107107  CPPUNIT_ASSERT_EQUAL( 1., BG->GetBondLength(0,0) );
    108108  CPPUNIT_ASSERT_EQUAL( 1.2, BG->GetBondLength(0,1) );
     
    117117  atom *Runner = TestMolecule->end->previous;
    118118  CPPUNIT_ASSERT( TestMolecule->end != Walker );
    119   CPPUNIT_ASSERT_EQUAL( true , BG->LoadBondLengthTable((ofstream *)&cout, *filename) );
    120   CPPUNIT_ASSERT_EQUAL( true , BG->ConstructBondGraph((ofstream *)&cout, TestMolecule) );
     119  CPPUNIT_ASSERT_EQUAL( true , BG->LoadBondLengthTable(*filename) );
     120  CPPUNIT_ASSERT_EQUAL( true , BG->ConstructBondGraph(TestMolecule) );
    121121  CPPUNIT_ASSERT_EQUAL( true , Walker->IsBondedTo(Runner) );
    122122};
  • src/unittests/logunittest.cpp

    r7326b2 re138de  
    1111
    1212#include "logunittest.hpp"
    13 #include "logger.hpp"
    14 #include "errorLogger.hpp"
    1513#include "log.hpp"
    1614#include "defs.hpp"
     
    3735{
    3836  logger::getInstance()->setVerbosity(2);
    39   cout << "Verbosity level is set to 2." << endl;
    40   log() << Verbose(0) << "Test level 0" << endl;
    41   log() << Verbose(1) << "Test level 1" << endl;
    42   log() << Verbose(2) << "Test level 2" << endl;
    43   log() << Verbose(3) << "Test level 3" << endl;
    44   log() << Verbose(4) << "Test level 4" << endl;
     37  Log() << Verbose(0) << "Verbosity level is set to 2." << endl;
     38  Log() << Verbose(0) << "Test level 0" << endl;
     39  Log() << Verbose(1) << "Test level 1" << endl;
     40  Log() << Verbose(2) << "Test level 2" << endl;
     41  Log() << Verbose(3) << "Test level 3" << endl;
     42  Log() << Verbose(4) << "Test level 4" << endl;
    4543
    46   log() << Verbose(0) << "Output a log message." << endl;
    47   elog() << Verbose(0) << "Output an error message." << endl;
     44  Log() << Verbose(0) << "Output a log message." << endl;
     45  eLog() << Verbose(0) << "Output an error message." << endl;
    4846  setVerbosity(3);
    49   log() << Verbose(4) << "This should not be printed." << endl;
    50   elog() << Verbose(4) << "This should not be printed." << endl;
     47  Log() << Verbose(4) << "This should not be printed." << endl;
     48  eLog() << Verbose(4) << "This should not be printed." << endl;
    5149};
    5250
  • src/unittests/memoryallocatorunittest.cpp

    r7326b2 re138de  
    4646  char* buffer3 = NULL;
    4747  buffer3 = Malloc<char>(4, "");
    48   cout << buffer3 << endl;
     48  Log() << Verbose(0) << buffer3 << endl;
    4949  Free(&buffer3);
    5050
  • src/unittests/stackclassunittest.cpp

    r7326b2 re138de  
    1313
    1414#include "stackclassunittest.hpp"
     15#include "log.hpp"
    1516
    1617enum { testdimension=3 };
     
    4142{
    4243  int testfield[testdimension] = {0,1,2};
    43   //cout << Verbose(1) << "Testing the snake stack..." << endl;
     44  //Log() << Verbose(1) << "Testing the snake stack..." << endl;
    4445  for (int i=0;i<testdimension;i++) {
    45     //cout << Verbose(2) << "Filling " << i << "th element of stack." << endl;
     46    //Log() << Verbose(2) << "Filling " << i << "th element of stack." << endl;
    4647    Stack->Push(&testfield[i]);
    4748  }
    48   //cout << endl;
     49  //Log() << Verbose(0) << endl;
    4950  //Output(out);
    5051  CPPUNIT_ASSERT_EQUAL(true, Stack->IsFull());
  • src/unittests/tesselationunittest.cpp

    r7326b2 re138de  
    6262  TesselStruct->LinesOnBoundary.clear();
    6363  TesselStruct->TrianglesOnBoundary.clear();
    64   TesselStruct->FindStartingTriangle((ofstream *)&cout, SPHERERADIUS, LinkedList);
     64  TesselStruct->FindStartingTriangle(SPHERERADIUS, LinkedList);
    6565  bool flag = false;
    6666
     
    6868  while (baseline != TesselStruct->LinesOnBoundary.end()) {
    6969    if (baseline->second->triangles.size() == 1) {
    70       flag = TesselStruct->FindNextSuitableTriangle((ofstream *)&cout, *(baseline->second), *(((baseline->second->triangles.begin()))->second), SPHERERADIUS, LinkedList); //the line is there, so there is a triangle, but only one.
     70      flag = TesselStruct->FindNextSuitableTriangle(*(baseline->second), *(((baseline->second->triangles.begin()))->second), SPHERERADIUS, LinkedList); //the line is there, so there is a triangle, but only one.
    7171    }
    7272    baseline++;
     
    9696{
    9797  // true inside points
    98   CPPUNIT_ASSERT_EQUAL( true, TesselStruct->IsInnerPoint((ofstream *)&cout, Vector(0.,0.,0.), LinkedList) );
    99   CPPUNIT_ASSERT_EQUAL( true, TesselStruct->IsInnerPoint((ofstream *)&cout, Vector(0.5,0.,0.), LinkedList) );
    100   CPPUNIT_ASSERT_EQUAL( true, TesselStruct->IsInnerPoint((ofstream *)&cout, Vector(0.,0.5,0.), LinkedList) );
    101   CPPUNIT_ASSERT_EQUAL( true, TesselStruct->IsInnerPoint((ofstream *)&cout, Vector(0.,0.,0.5), LinkedList) );
     98  CPPUNIT_ASSERT_EQUAL( true, TesselStruct->IsInnerPoint(Vector(0.,0.,0.), LinkedList) );
     99  CPPUNIT_ASSERT_EQUAL( true, TesselStruct->IsInnerPoint(Vector(0.5,0.,0.), LinkedList) );
     100  CPPUNIT_ASSERT_EQUAL( true, TesselStruct->IsInnerPoint(Vector(0.,0.5,0.), LinkedList) );
     101  CPPUNIT_ASSERT_EQUAL( true, TesselStruct->IsInnerPoint(Vector(0.,0.,0.5), LinkedList) );
    102102
    103103  // corners
    104104  for (LinkedNodes::iterator Runner = Corners.begin(); Runner != Corners.end(); Runner++)
    105     CPPUNIT_ASSERT_EQUAL( true, TesselStruct->IsInnerPoint((ofstream *)&cout, (*Runner), LinkedList) );
     105    CPPUNIT_ASSERT_EQUAL( true, TesselStruct->IsInnerPoint((*Runner), LinkedList) );
    106106
    107107  // true outside points
    108   CPPUNIT_ASSERT_EQUAL( false, TesselStruct->IsInnerPoint((ofstream *)&cout, Vector(0.,5.,0.), LinkedList) );
    109   CPPUNIT_ASSERT_EQUAL( false, TesselStruct->IsInnerPoint((ofstream *)&cout, Vector(0.,0.,5.), LinkedList) );
    110   CPPUNIT_ASSERT_EQUAL( false, TesselStruct->IsInnerPoint((ofstream *)&cout, Vector(1.,1.,1.), LinkedList) );
     108  CPPUNIT_ASSERT_EQUAL( false, TesselStruct->IsInnerPoint(Vector(0.,5.,0.), LinkedList) );
     109  CPPUNIT_ASSERT_EQUAL( false, TesselStruct->IsInnerPoint(Vector(0.,0.,5.), LinkedList) );
     110  CPPUNIT_ASSERT_EQUAL( false, TesselStruct->IsInnerPoint(Vector(1.,1.,1.), LinkedList) );
    111111
    112112  // tricky point, there are three equally close triangles
    113   CPPUNIT_ASSERT_EQUAL( false, TesselStruct->IsInnerPoint((ofstream *)&cout, Vector(5.,0.,0.), LinkedList) );
     113  CPPUNIT_ASSERT_EQUAL( false, TesselStruct->IsInnerPoint(Vector(5.,0.,0.), LinkedList) );
    114114
    115115};
     
    173173  for (PointMap::iterator Runner = TesselStruct->PointsOnBoundary.begin(); Runner != TesselStruct->PointsOnBoundary.end(); Runner++) {
    174174    Walker = Runner->second;
    175     set<BoundaryTriangleSet*> *triangles = TesselStruct->GetAllTriangles((ofstream *)&cout, Walker);
     175    set<BoundaryTriangleSet*> *triangles = TesselStruct->GetAllTriangles(Walker);
    176176    CPPUNIT_ASSERT_EQUAL( (size_t)3, triangles->size() );
    177177    // check that the returned triangle all contain the Walker
  • src/unittests/vectorunittest.cpp

    r7326b2 re138de  
    186186{
    187187  // plane at (0,0,0) normal to (1,0,0) cuts line from (0,0,0) to (2,1,0) at ???
    188   CPPUNIT_ASSERT_EQUAL( true, fixture.GetIntersectionWithPlane((ofstream *)&cout, &unit, &zero, &zero, &two) );
     188  CPPUNIT_ASSERT_EQUAL( true, fixture.GetIntersectionWithPlane(&unit, &zero, &zero, &two) );
    189189  CPPUNIT_ASSERT_EQUAL( zero, fixture );
    190190
    191191  // plane at (2,1,0) normal to (0,1,0) cuts line from (1,0,0) to (0,1,1) at ???
    192   CPPUNIT_ASSERT_EQUAL( true, fixture.GetIntersectionWithPlane((ofstream *)&cout, &otherunit, &two, &unit, &notunit) );
     192  CPPUNIT_ASSERT_EQUAL( true, fixture.GetIntersectionWithPlane(&otherunit, &two, &unit, &notunit) );
    193193  CPPUNIT_ASSERT_EQUAL( Vector(0., 1., 1.), fixture );
    194194
    195195  // four vectors equal to zero
    196   CPPUNIT_ASSERT_EQUAL( false, fixture.GetIntersectionOfTwoLinesOnPlane((ofstream *)&cout, &zero, &zero, &zero, &zero, NULL) );
     196  CPPUNIT_ASSERT_EQUAL( false, fixture.GetIntersectionOfTwoLinesOnPlane(&zero, &zero, &zero, &zero, NULL) );
    197197  CPPUNIT_ASSERT_EQUAL( zero, fixture );
    198198
    199199  // four vectors equal to unit
    200   CPPUNIT_ASSERT_EQUAL( false, fixture.GetIntersectionOfTwoLinesOnPlane((ofstream *)&cout, &unit, &unit, &unit, &unit, NULL) );
     200  CPPUNIT_ASSERT_EQUAL( false, fixture.GetIntersectionOfTwoLinesOnPlane(&unit, &unit, &unit, &unit, NULL) );
    201201  CPPUNIT_ASSERT_EQUAL( zero, fixture );
    202202
    203203  // two equal lines
    204   CPPUNIT_ASSERT_EQUAL( true, fixture.GetIntersectionOfTwoLinesOnPlane((ofstream *)&cout, &unit, &two, &unit, &two, NULL) );
     204  CPPUNIT_ASSERT_EQUAL( true, fixture.GetIntersectionOfTwoLinesOnPlane(&unit, &two, &unit, &two, NULL) );
    205205  CPPUNIT_ASSERT_EQUAL( unit, fixture );
    206206
    207207  // line from (1,0,0) to (2,1,0) cuts line from (1,0,0) to (0,1,0) at ???
    208   CPPUNIT_ASSERT_EQUAL( true, fixture.GetIntersectionOfTwoLinesOnPlane((ofstream *)&cout, &unit, &two, &unit, &otherunit, NULL) );
     208  CPPUNIT_ASSERT_EQUAL( true, fixture.GetIntersectionOfTwoLinesOnPlane(&unit, &two, &unit, &otherunit, NULL) );
    209209  CPPUNIT_ASSERT_EQUAL( unit, fixture );
    210210
    211211  // line from (1,0,0) to (0,0,0) cuts line from (0,0,0) to (2,1,0) at ???
    212   CPPUNIT_ASSERT_EQUAL( true, fixture.GetIntersectionOfTwoLinesOnPlane((ofstream *)&cout, &unit, &zero, &zero, &two, NULL) );
     212  CPPUNIT_ASSERT_EQUAL( true, fixture.GetIntersectionOfTwoLinesOnPlane(&unit, &zero, &zero, &two, NULL) );
    213213  CPPUNIT_ASSERT_EQUAL( zero, fixture );
    214214
    215215  // line from (1,0,0) to (2,1,0) cuts line from (0,0,0) to (0,1,0) at ???
    216   CPPUNIT_ASSERT_EQUAL( true, fixture.GetIntersectionOfTwoLinesOnPlane((ofstream *)&cout, &unit, &two, &zero, &otherunit, NULL) );
     216  CPPUNIT_ASSERT_EQUAL( true, fixture.GetIntersectionOfTwoLinesOnPlane(&unit, &two, &zero, &otherunit, NULL) );
    217217  CPPUNIT_ASSERT_EQUAL( Vector(0., -1., 0.), fixture );
    218218};
Note: See TracChangeset for help on using the changeset viewer.