Matej Cepl
087149a635
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python3-espressomd?expand=0&rev=38
57 lines
2.0 KiB
Diff
57 lines
2.0 KiB
Diff
From 8182bb208e31cf9244dd3e6f567d3e27a33c973e Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Jean-No=C3=ABl=20Grad?= <jgrad@icp.uni-stuttgart.de>
|
|
Date: Wed, 20 Jul 2022 21:25:34 +0200
|
|
Subject: [PATCH 1/2] tests: Fix integral size on 32bit archs
|
|
|
|
---
|
|
src/scafacos/src/Scafacos.cpp | 13 -------------
|
|
src/utils/tests/integral_parameter_test.cpp | 6 +++---
|
|
2 files changed, 3 insertions(+), 16 deletions(-)
|
|
|
|
--- a/src/scafacos/src/Scafacos.cpp
|
|
+++ b/src/scafacos/src/Scafacos.cpp
|
|
@@ -21,7 +21,6 @@
|
|
|
|
#include "utils.hpp"
|
|
|
|
-#include <algorithm>
|
|
#include <string>
|
|
#include <utility>
|
|
#include <vector>
|
|
@@ -71,18 +70,6 @@ std::vector<std::string> Scafacos::avail
|
|
return methods;
|
|
}
|
|
|
|
-static std::string parse_method_parameters(
|
|
- std::vector<std::vector<std::string>> const ¶meters) {
|
|
- std::string method_params = "";
|
|
- for (auto const ¶meter : parameters) {
|
|
- for (auto const &value : parameter) {
|
|
- method_params += " " + value;
|
|
- }
|
|
- }
|
|
- std::replace(method_params.begin(), method_params.end(), ' ', ',');
|
|
- return method_params.substr(1);
|
|
-}
|
|
-
|
|
Scafacos::Scafacos(MPI_Comm comm, std::string method, std::string parameters)
|
|
: m_method_name{std::move(method)}, m_parameters{std::move(parameters)} {
|
|
|
|
--- a/src/utils/tests/integral_parameter_test.cpp
|
|
+++ b/src/utils/tests/integral_parameter_test.cpp
|
|
@@ -38,11 +38,11 @@ BOOST_AUTO_TEST_CASE(integral_parameter_
|
|
std::pair<std::size_t, int>>::value,
|
|
"");
|
|
|
|
- BOOST_CHECK(std::make_pair(1ul, 13) ==
|
|
+ BOOST_CHECK(std::make_pair(std::size_t{1u}, 13) ==
|
|
(Utils::integral_parameter<F, 1, 5>(1, 13)));
|
|
- BOOST_CHECK(std::make_pair(3ul, 13) ==
|
|
+ BOOST_CHECK(std::make_pair(std::size_t{3u}, 13) ==
|
|
(Utils::integral_parameter<F, 1, 5>(3, 13)));
|
|
- BOOST_CHECK(std::make_pair(5ul, 13) ==
|
|
+ BOOST_CHECK(std::make_pair(std::size_t{5u}, 13) ==
|
|
(Utils::integral_parameter<F, 1, 5>(5, 13)));
|
|
BOOST_CHECK_THROW((Utils::integral_parameter<F, 1, 5>(6, 13)),
|
|
std::exception);
|