Fixed list_of problem on old boost and clang

release/4.3a0
Richard Roberts 2013-08-16 15:07:54 +00:00
parent 0212bbc30d
commit 14fef517d8
3 changed files with 6 additions and 7 deletions

View File

@ -184,8 +184,8 @@ TEST(GaussianBayesNet, ComputeSteepestDescentPoint) {
VectorValues actual = gbn.optimizeGradientSearch();
// Check that points agree
Vector actualAsVector = actual.vector(FastVector<Key>(list_of
(0)(1)(2)(3)(4)));
FastVector<Key> keys = list_of(0)(1)(2)(3)(4);
Vector actualAsVector = actual.vector(keys);
EXPECT(assert_equal(expected, actualAsVector, 1e-5));
// Check that point causes a decrease in error

View File

@ -274,9 +274,8 @@ TEST(GaussianBayesTree, ComputeSteepestDescentPointBT) {
VectorValues actual = bt.optimizeGradientSearch();
// Check that points agree
Vector actualAsVector = actual.vector(FastVector<Key>(list_of
(0)(1)(2)(3)(4)));
EXPECT(assert_equal(expected, actualAsVector, 1e-5));
FastVector<Key> keys = list_of(0)(1)(2)(3)(4);
EXPECT(assert_equal(expected, actual.vector(keys), 1e-5));
EXPECT(assert_equal(expectedFromBN, actual, 1e-5));
// Check that point causes a decrease in error

View File

@ -60,8 +60,8 @@ TEST(VectorValues, basics)
EXPECT(assert_equal(Vector_(2, 2.0, 3.0), actual[1]));
EXPECT(assert_equal(Vector_(2, 4.0, 5.0), actual[2]));
EXPECT(assert_equal(Vector_(2, 6.0, 7.0), actual[5]));
EXPECT(assert_equal(Vector_(7, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0), actual.vector(FastVector<Key>(list_of
(0)(1)(2)(5)))));
FastVector<Key> keys = list_of(0)(1)(2)(5);
EXPECT(assert_equal(Vector_(7, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0), actual.vector(keys)));
// Check exceptions
CHECK_EXCEPTION(actual.insert(1, Vector()), invalid_argument);