Skip to content

Commit 977d16f

Browse files
style: pre-commit.ci fixes
1 parent 1e0515c commit 977d16f

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

tests/localeTest.cpp

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,22 @@
88

99
#include <complex>
1010
#include <cstdint>
11-
#include <string>
12-
#include <utility>
13-
#include <vector>
11+
#include <iomanip>
1412
#include <iostream>
1513
#include <locale>
16-
#include <iomanip>
1714
#include <numeric>
18-
15+
#include <string>
16+
#include <utility>
17+
#include <vector>
1918

2019
// Custom facet for thousands separator
2120
class CustomThousandsSeparator : public std::numpunct<char> {
22-
protected:
23-
char do_thousands_sep() const override { return '|'; } // Space separator
24-
std::string do_grouping() const override { return "\2"; } // Group digits in sets of 2
21+
protected:
22+
char do_thousands_sep() const override { return '|'; } // Space separator
23+
std::string do_grouping() const override { return "\2"; } // Group digits in sets of 2
2524
};
2625

27-
//derived from https://github.com/CLIUtils/CLI11/pull/1160
26+
// derived from https://github.com/CLIUtils/CLI11/pull/1160
2827
TEST_CASE_METHOD(TApp, "locale", "[separators]") {
2928
std::locale customLocale(std::locale::classic(), new CustomThousandsSeparator);
3029
std::locale::global(customLocale); // Set as the default system-wide locale
@@ -35,15 +34,12 @@ TEST_CASE_METHOD(TApp, "locale", "[separators]") {
3534
std::uint64_t bar;
3635
float qux;
3736

38-
app.add_option("FOO", foo, "Foo option")
39-
->default_val(1234567)->force_callback();
40-
app.add_option("BAR", bar, "Bar option")
41-
->default_val(2345678)->force_callback();
42-
app.add_option("QUX", qux, "QUX option")
43-
->default_val(3456.78)->force_callback();
37+
app.add_option("FOO", foo, "Foo option")->default_val(1234567)->force_callback();
38+
app.add_option("BAR", bar, "Bar option")->default_val(2345678)->force_callback();
39+
app.add_option("QUX", qux, "QUX option")->default_val(3456.78)->force_callback();
4440

4541
CHECK_NOTHROW(run());
46-
CHECK(foo==1234567);
47-
CHECK(bar==2345678);
42+
CHECK(foo == 1234567);
43+
CHECK(bar == 2345678);
4844
CHECK_THAT(qux, Catch::Matchers::WithinAbs(13456.78, 0.01));
4945
}

0 commit comments

Comments
 (0)