https://github.com/ibex-team/ibex-lib
Tip revision: 35e863ae45da619bfc409009ea0930ee53ecb510 authored by Jordan08 on 23 February 2016, 10:49:30 UTC
tmp
tmp
Tip revision: 35e863a
TestExprCopy.cpp
/* ============================================================================
* I B E X - Symbolic copy tests
* ============================================================================
* Copyright : Ecole des Mines de Nantes (FRANCE)
* License : This program can be distributed under the terms of the GNU LGPL.
* See the file COPYING.LESSER.
*
* Author(s) : Gilles Chabert
* Created : Mar 14, 2013
* ---------------------------------------------------------------------------- */
#include "TestExprCopy.h"
#include "ibex_ExprCopy.h"
using namespace std;
namespace ibex {
void TestExprCopy::index_copy01() {
Variable x1,x2;
const Array<const ExprSymbol> ignore1(x1);
const Array<const ExprSymbol> ignore2(x2);
IntervalVector vec(2,Interval(0,1));
const ExprNode& y=ExprConstant::new_vector(vec,false);
const ExprNode& yi=ExprCopy().index_copy(ignore1,ignore2,y,0);
const ExprConstant* c = dynamic_cast<const ExprConstant*>(&yi);
TEST_ASSERT(c);
TEST_ASSERT(c->dim.is_scalar());
TEST_ASSERT(c->get_value()==Interval(0,1));
}
} // end namespace