ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkTestNumericLocale.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkTestNumericLocale_h
19#define itkTestNumericLocale_h
20
21#include <string>
22
23namespace itk::test
24{
25
28inline constexpr const char * const commaDecimalLocales[] = { "de_DE.UTF-8", "fr_FR.UTF-8", "nl_NL.UTF-8",
29 "it_IT.UTF-8", "de-DE", "German_Germany.1252",
30 "French_France.1252" };
31
34inline bool
36{
37#if defined(__APPLE__) || defined(_WIN32)
38 return true;
39#else
40 return false;
41#endif
42}
43
44inline std::string
46{
47 return "No decimal-comma locale installed, so the locale-independent parse and format paths were "
48 "NOT exercised on this runner. Install e.g. de_DE.UTF-8 (Linux: locale-gen) to cover them.";
49}
50
51} // namespace itk::test
52
53#endif // itkTestNumericLocale_h
bool CommaDecimalLocaleIsExpected()
std::string NoCommaDecimalLocaleMessage()
constexpr const char *const commaDecimalLocales[]