From: Eunki, Hong Date: Fri, 31 Mar 2023 09:09:47 +0000 (+0900) Subject: Fix UTC error for TextSpannable X-Git-Tag: dali_2.2.21~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F290730%2F1;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Fix UTC error for TextSpannable FontDescriptionRun is not null-terminate string Change-Id: I5f8704c850f2fb3ad213b54a7a23897efe2cdeb6 Signed-off-by: Eunki, Hong --- diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-TextSpannable.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-TextSpannable.cpp index 40f51de..36125c5 100644 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-TextSpannable.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-TextSpannable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -292,7 +292,7 @@ int UtcDaliToolkitTextLabelSetSpannedText_FontSpan(void) const Vector& validFontDescriptionRuns = labelImpl.GetTextController()->GetTextModel()->GetFontDescriptionRuns(); DALI_TEST_EQUALS(validFontDescriptionRuns.Count(), 1u, TEST_LOCATION); - std::string familyName = validFontDescriptionRuns[0].familyName; + std::string familyName = std::string(validFontDescriptionRuns[0].familyName, validFontDescriptionRuns[0].familyLength); DALI_TEST_EQUALS(familyName, "TizenSans", TEST_LOCATION); DALI_TEST_EQUALS(validFontDescriptionRuns[0].size, expectedPointSize, TEST_LOCATION);