source: trunk/test_more/ndebug.cpp @ 2354

Last change on this file since 2354 was 1717, checked in by bradbell, 10 years ago

trunk: ndebug.cpp test compiles, but not use, ADFun<double> copy operation

configure: update package version, and autoconf version.
makefile.am: add ndebug.cpp to list of source files and compile with NDEBUG.
makefile.in: changes automatically transfered from makefile.am.
test_more.cpp: add ndebug to list of tests.
test_one.sh.in: treat ndebug.cpp as special case with NDEBUG defined.
test_more.vcproj: add ndebug to list of tests.
makefile.in: update corresponding makefile.am.
whats_new_10.omh: user's view of changes.
error_handler.hpp: exit even if NDEBUG is defined.

  • Property svn:keywords set to Id
File size: 1006 bytes
Line 
1/* $Id: ndebug.cpp 1717 2010-11-28 05:19:17Z bradbell $ */
2/* --------------------------------------------------------------------------
3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-10 Bradley M. Bell
4
5CppAD is distributed under multiple licenses. This distribution is under
6the terms of the
7                    Common Public License Version 1.0.
8
9A copy of this license is included in the COPYING file of this distribution.
10Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
11-------------------------------------------------------------------------- */
12
13/*
14Tests that that expect NDEBUG to be defined.
15*/
16
17# include <cppad/cppad.hpp>
18
19namespace {
20        // make sure that this function can be compiled
21        bool ad_fun_copy(void)
22        {       bool                ok = true;
23                CppAD::ADFun<double> f;
24
25                // This operation uses the ADFun copy constructor which is defined,
26                // but should not be used
27                CppAD::ADFun<double> g(f);
28
29                ok &= (g.size_var() == 0);
30
31                return ok;
32        }
33}
34
35
36bool ndebug(void)
37{       bool ok = true;
38
39
40        return ok;
41}
Note: See TracBrowser for help on using the repository browser.