source: trunk/test_more/ndebug.cpp @ 2506

Last change on this file since 2506 was 2506, checked in by bradbell, 8 years ago

Change Licenses: CPL-1.0 -> EPL-1.0, GPL-2.0->GPL-3.0

  • Property svn:keywords set to Id
File size: 1007 bytes
Line 
1/* $Id: ndebug.cpp 2506 2012-10-24 19:36:49Z 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                    Eclipse 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.