1 | /*
|
---|
2 | * $Rev: 5266 $
|
---|
3 | * Author: Jesse Perla (c) 2010
|
---|
4 | * Use, modification and distribution are subject to the
|
---|
5 | * Boost Software License, Version 1.0. (See accompanying file
|
---|
6 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
---|
7 | */
|
---|
8 |
|
---|
9 | #define BOOST_TEST_MODULE test_boost_vector_constructors_patch
|
---|
10 | #include <boost/test/unit_test.hpp>
|
---|
11 | #include <boost/numeric/ublas/vector.hpp>
|
---|
12 |
|
---|
13 | using namespace boost::numeric::ublas;
|
---|
14 |
|
---|
15 | BOOST_AUTO_TEST_CASE( test_bounded_vector_cast_from_int )
|
---|
16 | {
|
---|
17 | bounded_vector<double, 2> v;
|
---|
18 | //v = 2; //This SHOULDN'T compile if the patch is correct.
|
---|
19 | }
|
---|
20 |
|
---|
21 | BOOST_AUTO_TEST_CASE( test_bounded_vector_construct_assign )
|
---|
22 | {
|
---|
23 | bounded_vector<int, 2> v(2, 3);
|
---|
24 | BOOST_REQUIRE_EQUAL(v(0), 3);
|
---|
25 | BOOST_REQUIRE_EQUAL(v(1), 3);
|
---|
26 | }
|
---|
27 |
|
---|