MCPcopy Create free account
hub / github.com/axmolengine/axmol / LabelWrapNoBreakSpaceTest

Method LabelWrapNoBreakSpaceTest

tests/cpp-tests/Source/LabelTest/LabelTest.cpp:2950–2959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2948/////////////////////////////////////////////////
2949
2950LabelWrapNoBreakSpaceTest::LabelWrapNoBreakSpaceTest()
2951{
2952 _label->setLineBreakWithoutSpace(false);
2953 const char* no_break_space_utf8 = "\xC2\xA0"; // 0xA0 - no-break space
2954 auto str = fmt::format(
2955 "The price is ${}1.25. \n\nthe space between \"$\" and \"1.25\" is a no break space.", no_break_space_utf8);
2956 _label->setString(str);
2957 _label->setVerticalAlignment(TextVAlignment::TOP);
2958 _label->setOverflow(Label::Overflow::CLAMP);
2959}
2960
2961std::string LabelWrapNoBreakSpaceTest::title() const
2962{

Callers

nothing calls this directly

Calls 5

setVerticalAlignmentMethod · 0.80
formatFunction · 0.50
setStringMethod · 0.45
setOverflowMethod · 0.45

Tested by

no test coverage detected