@@ -95,7 +95,7 @@ TEST_SUBMODULE(builtin_casters, m) {
95
95
} // 𝐀, utf16
96
96
else {
97
97
wstr.push_back ((wchar_t ) mathbfA32);
98
- } // 𝐀, utf32
98
+ } // 𝐀, utf32
99
99
wstr.push_back (0x7a ); // z
100
100
101
101
m.def (" good_utf8_string" , []() {
@@ -104,10 +104,9 @@ TEST_SUBMODULE(builtin_casters, m) {
104
104
m.def (" good_utf16_string" , [=]() {
105
105
return std::u16string ({b16, ib16, cake16_1, cake16_2, mathbfA16_1, mathbfA16_2, z16});
106
106
}); // b‽🎂𝐀z
107
- m.def (" good_utf32_string" , [=]() {
108
- return std::u32string ({a32, mathbfA32, cake32, ib32, z32});
109
- }); // a𝐀🎂‽z
110
- m.def (" good_wchar_string" , [=]() { return wstr; }); // a‽𝐀z
107
+ m.def (" good_utf32_string" ,
108
+ [=]() { return std::u32string ({a32, mathbfA32, cake32, ib32, z32}); }); // a𝐀🎂‽z
109
+ m.def (" good_wchar_string" , [=]() { return wstr; }); // a‽𝐀z
111
110
m.def (" bad_utf8_string" , []() {
112
111
return std::string (" abc\xd0 "
113
112
" def" );
@@ -117,9 +116,8 @@ TEST_SUBMODULE(builtin_casters, m) {
117
116
// UnicodeDecodeError
118
117
m.def (" bad_utf32_string" , [=]() { return std::u32string ({a32, char32_t (0xd800 ), z32}); });
119
118
if (sizeof (wchar_t ) == 2 ) {
120
- m.def (" bad_wchar_string" , [=]() {
121
- return std::wstring ({wchar_t (0x61 ), wchar_t (0xd800 )});
122
- });
119
+ m.def (" bad_wchar_string" ,
120
+ [=]() { return std::wstring ({wchar_t (0x61 ), wchar_t (0xd800 )}); });
123
121
}
124
122
m.def (" u8_Z" , []() -> char { return ' Z' ; });
125
123
m.def (" u8_eacute" , []() -> char { return ' \xe9 ' ; });
@@ -236,8 +234,7 @@ TEST_SUBMODULE(builtin_casters, m) {
236
234
237
235
// test_int_convert
238
236
m.def (" int_passthrough" , [](int arg) { return arg; });
239
- m.def (
240
- " int_passthrough_noconvert" , [](int arg) { return arg; }, py::arg{}.noconvert ());
237
+ m.def (" int_passthrough_noconvert" , [](int arg) { return arg; }, py::arg{}.noconvert ());
241
238
242
239
// test_tuple
243
240
m.def (
@@ -302,17 +299,15 @@ TEST_SUBMODULE(builtin_casters, m) {
302
299
303
300
// test_bool_caster
304
301
m.def (" bool_passthrough" , [](bool arg) { return arg; });
305
- m.def (
306
- " bool_passthrough_noconvert" , [](bool arg) { return arg; }, py::arg{}.noconvert ());
302
+ m.def (" bool_passthrough_noconvert" , [](bool arg) { return arg; }, py::arg{}.noconvert ());
307
303
308
304
// TODO: This should be disabled and fixed in future Intel compilers
309
305
#if !defined(__INTEL_COMPILER)
310
306
// Test "bool_passthrough_noconvert" again, but using () instead of {} to construct py::arg
311
307
// When compiled with the Intel compiler, this results in segmentation faults when importing
312
308
// the module. Tested with icc (ICC) 2021.1 Beta 20200827, this should be tested again when
313
309
// a newer version of icc is available.
314
- m.def (
315
- " bool_passthrough_noconvert2" , [](bool arg) { return arg; }, py::arg ().noconvert ());
310
+ m.def (" bool_passthrough_noconvert2" , [](bool arg) { return arg; }, py::arg ().noconvert ());
316
311
#endif
317
312
318
313
// test_reference_wrapper
0 commit comments