- DALI_TEST_EQUALS(expected0, label3.GetNaturalSize(), TEST_LOCATION);
- label3.SetProperty(TextLabel::Property::LINE_SPACING, 20);
- DALI_TEST_EQUALS(expected1, label3.GetNaturalSize(), TEST_LOCATION);
+ Vector3 multiLineNaturalSize = label3.GetNaturalSize();
+
+ // The width of the text when multi-line is enabled will be smaller (lines separated on '\n')
+ // The height of the text when multi-line is enabled will be larger
+ DALI_TEST_CHECK( oneLineNaturalSize.width > multiLineNaturalSize.width );
+ DALI_TEST_CHECK( oneLineNaturalSize.height < multiLineNaturalSize.height );
+
+ // Change line spacing, meaning height will increase by 3 times the amount specified as we have three lines
+ // Everything else will remain the same
+ int lineSpacing = 20;
+ label3.SetProperty( TextLabel::Property::LINE_SPACING, lineSpacing );
+ Vector3 expectedAfterLineSpacingApplied( multiLineNaturalSize );
+ expectedAfterLineSpacingApplied.height += 3 * lineSpacing;
+ DALI_TEST_EQUALS( expectedAfterLineSpacingApplied, label3.GetNaturalSize(), TEST_LOCATION );