Changeset 1077 for trunk/test_more


Ignore:
Timestamp:
Nov 18, 2007 9:03:32 AM (13 years ago)
Author:
bradbell
Message:

trunk: Changes from branches/tape_values (ones without modification).

hes_lu_det.cpp: change prototype so automatically reconized by test_one.sh.
mul_level_adolc.cpp: meet new base type requirements and change prototype.
ode_taylor_adolc.cpp: meet new base type requirements.
?/test_one.sh: change so no longer need routine name on command line.
base_adolc.hpp: example of new base type requirements.
mul_level.cpp: change prototype.
merge.sh: command used to find differences of trunk from branches/tape_values.
base_adolc.cpp: example of new base type requirements.
test_more.cpp: always print memory leak test results.
base_require.omh: new base type requirements.
whats_new_07.omh: user's view of the changes.
for_jac_sweep.hpp: remove variable from PrivOp? instruction.
op_code.hpp: remove variable from PrivOp? instruction.
forward_sweep.hpp: improve comments, remove variable from PrivOp? instruction.
rev_jac_sweep.hpp: remove variable from PrivOp? instruction.
rev_hes_sweep.hpp: remove variable from PrivOp? instruction.
base_complex.hpp: example of new base requirements.
reverse_sweep.hpp: remove variable from PrivOp? instruction.
cppad.hpp: meet new base requirements.

Location:
trunk/test_more
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test_more/base_adolc.cpp

    r976 r1077  
    99Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
    1010-------------------------------------------------------------------------- */
    11 # include <cppad/cppad.hpp>
    12 
    1311# include <adolc/adouble.h>
    1412# include <adolc/interfaces.h>
     
    1816# include "../example/base_adolc.hpp"
    1917
    20 bool base_adolc()
     18# include <cppad/cppad.hpp>
     19
     20bool base_adolc(void)
    2121{       bool ok = true;                   // initialize test result
    2222
  • trunk/test_more/test_more.cpp

    r1059 r1077  
    169169# endif
    170170
    171         // check for memory leak in previous calculations
    172         if( CppADTrackCount() != 0 )
     171        // check for errors
     172        using std::cout;
     173        using std::endl;
     174        assert( ok || (Run_error_count > 0) );
     175        if( CppADTrackCount() == 0 )
     176        {       Run_ok_count++;
     177                cout << "Ok:    " << "No memory leak detected" << endl;
     178        }
     179        else
    173180        {       ok = false;
    174                 cout << "Error: memroy leak detected" << endl;
     181                Run_error_count++;
     182                cout << "Error: " << "memory leak detected" << endl;
    175183        }
    176 
    177         assert( ok || (Run_error_count > 0) );
     184        // convert int(size_t) to avoid warning on _MSC_VER systems
    178185        if( ok )
    179186                cout << "All " << int(Run_ok_count) << " tests passed." << endl;
     
    181188
    182189        return static_cast<int>( ! ok );
     190
    183191}
    184192// END PROGRAM
  • trunk/test_more/test_one.sh

    r965 r1077  
    1313if [ "$1" = "" ]
    1414then
    15         echo "usage: test_one.sh file function [extra]"
     15        echo "usage: test_one.sh file [extra]"
    1616        echo "file is the *.cpp file name with extension"
    17         echo "function is the name of the function being tested"
    1817        echo "and extra is extra options for g++ command"
    1918        exit 1
    2019fi
     20fun=`grep "^bool *[a-zA-Z_]*( *void *)" $1 | tail -1 | \
     21        sed -e "s/^bool *\([a-zA-Z_]*\) *( *void *)/\1/"`
    2122if [ -e test_one.exe ]
    2223then
     
    2526sed < test_more.cpp > test_one.cpp \
    2627-e '/ok *\&= *Run( /d' \
    27 -e "s/.*This line is used by test_one.sh.*/     ok \&= Run( $2, \"$2\");/" 
     28-e "s/.*This line is used by test_one.sh.*/     ok \&= Run( $fun, \"$fun\");/" 
    2829#
    2930cmd="g++ test_one.cpp $1 $3
Note: See TracChangeset for help on using the changeset viewer.