Skip to content

Commit

Permalink
Reworked tuple constructors in apply_test (Issue #993)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbales2 committed Sep 13, 2018
1 parent 17d800c commit 76b42c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/unit/math/prim/scal/functor/apply_test.cpp
Expand Up @@ -12,7 +12,7 @@ struct func {
};

TEST(MathFunctions, apply_basic_double) {
std::tuple<double> x = {1.0};
std::tuple<double> x = std::make_tuple(1.0);

auto y = stan::math::apply(func{}, x);

Expand All @@ -21,7 +21,7 @@ TEST(MathFunctions, apply_basic_double) {
}

TEST(MathFunctions, apply_basic_int) {
std::tuple<int> x = {1};
std::tuple<int> x = std::make_tuple(1);

auto y = stan::math::apply(func{}, x);

Expand All @@ -30,7 +30,7 @@ TEST(MathFunctions, apply_basic_int) {
}

TEST(MathFunctions, apply_const_double) {
const std::tuple<const double> x = {1.0};
const std::tuple<const double> x = std::make_tuple(1.0);

auto y = stan::math::apply(func{}, x);

Expand Down Expand Up @@ -68,7 +68,7 @@ TEST(MathFunctions, apply_temporary_function_const_reference) {
}

TEST(MathFunctions, apply_temporary_function_return_reference) {
std::tuple<double> x = {1.0};
std::tuple<double> x = std::make_tuple(1.0);

decltype(auto) y = stan::math::apply([](auto& x) -> auto& { return x; }, x);

Expand All @@ -77,7 +77,7 @@ TEST(MathFunctions, apply_temporary_function_return_reference) {
}

TEST(MathFunctions, apply_temporary_function_return_const_reference) {
std::tuple<double> x = {1.0};
std::tuple<double> x = std::make_tuple(1.0);

decltype(auto) y
= stan::math::apply([](const auto& x) -> const auto& { return x; }, x);
Expand Down

0 comments on commit 76b42c1

Please sign in to comment.