10 Commits
Author SHA1 Message Date
Jens GeyerandClaude Opus 5 044e3d73f0 THRIFT-6194: Restore the global locale after the ToStringTest cases that set it
Client: cpp

Two cases in ToStringTest call std::locale::global() and never put back what
was there. Setting it is the point -- they prove to_string() does not follow
the global locale, which is why TToString.h imbues a default one on the
streams it builds -- but leaving it set is not. Every stream constructed later
in the same UnitTests binary picks it up, in suites that have nothing to do
with this one, and numbers formatted through an ostringstream come out with
digit grouping.

That has already cost a debugging session. A case in THttpBufferBoundTest
formats a chunk size with "size << std::hex << 4096" and got "1.000" rather
than "1000", so the transport under test read a different stream, and the case
passed or failed depending on whether it ran alone or in a full run --
ToStringTest is disabled by default and only runs when the whole binary does.

A scoped guard restores the previous global locale on exit. The cases still
set the locale for their own duration, so what they assert is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-07 18:36:45 +02:00
CJCombrink 4b90909ddd THRIFT-5773 Strong UUID wrapper for C++
Client: cpp/CMakeLists.txt
Patch: Carel Combrink

This closes #2958
2024-06-17 22:26:56 +02:00
CJCombrink 1d886ca4af THRIFT-5772: UUID support for c++ #2952
Client: cpp
Patch: CJCombrink

This closes #2952
2024-04-07 22:41:58 +02:00
Mario Emmenlauer e664ac4903 lib/cpp/test/ToStringTest.cpp: Disabled locale-based tests on Windows 2021-08-12 22:26:43 +02:00
ubuntu ad76a18db7 Add better unit tests and imbue C locale in floating point to_string
ToStringTest.cpp is a better place than JSONProtoTest.cpp for to_string
tests. Move global locale-related unit tests there.
Also imbue the C locale in the floating point to_string functions to avoid
decimal number strings formatted with comma instead of decimal point.
In Dockerfiles, install de_DE locale because it uses decimal comma.
2021-06-07 08:21:05 +05:30
zeshuai007 6b1cb30f48 THRIFT-5217 Deprecated boost header
Client: cpp
Patch: Zezeng Wang

This closes #2158
2020-09-12 19:07:28 +02:00
Konrad Grochowski 16a23a6618 THRIFT-2729: C++ - .clang-format created and applied
Client: C++
Patch: Konrad Grochowski

make style command added
2014-11-18 11:39:10 +01:00
Konrad Grochowski 240120c843 Revert "THRIFT-2729: C++ - .clang-format created and applied"
This reverts commit 74260aa909.
2014-11-18 11:33:31 +01:00
Konrad Grochowski 74260aa909 THRIFT-2729: C++ - .clang-format created and applied
Client: C++
Patch: Konrad Grochowski

make style command added
2014-11-18 10:02:08 +01:00
Konrad Grochowski b3f6ea100f THRIFT-2067 C++: all generated objects provide ostream operator<< 2014-09-03 23:41:32 +02:00