ICU-22954 Delete copy & assign from IcuTestErrorCode.

There's no reason to ever make a copy of these objects, existing code
that does this is doing it by mistake.
This commit is contained in:
Fredrik Roubert 2024-12-30 17:52:03 +09:00 committed by Fredrik Roubert
parent 6091406a3a
commit b2a47f9aa4
3 changed files with 5 additions and 2 deletions

View file

@ -618,7 +618,7 @@ void ListFormatterTest::DoTheRealListStyleTesting(
UListFormatterType type,
UListFormatterWidth width,
const char* expected,
IcuTestErrorCode status) {
IcuTestErrorCode& status) {
LocalPointer<ListFormatter> formatter(
ListFormatter::createInstance(locale, type, width, status));

View file

@ -115,7 +115,7 @@ class ListFormatterTest : public IntlTestWithFieldPosition {
UListFormatterType type,
UListFormatterWidth width,
const char* expected,
IcuTestErrorCode status);
IcuTestErrorCode& status);
private:
// Reused test data.

View file

@ -37,6 +37,9 @@ public:
class T_CTEST_EXPORT_API IcuTestErrorCode {
public:
IcuTestErrorCode(const IcuTestErrorCode&) = delete;
IcuTestErrorCode& operator=(const IcuTestErrorCode&) = delete;
IcuTestErrorCode(TestLog &callingTestClass, const char *callingTestName)
: errorCode(U_ZERO_ERROR),
testClass(callingTestClass), testName(callingTestName), scopeMessage() {}