mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
SimpleShapedText: Prevent running tests when no default typefaces can be found
This commit is contained in:
parent
7a1f397de6
commit
ad3457434e
1 changed files with 10 additions and 1 deletions
|
|
@ -1495,9 +1495,18 @@ struct SimpleShapedTextTests : public UnitTest
|
|||
|
||||
void runTest (const char* text, float maxWidth)
|
||||
{
|
||||
const auto defaultTypeface = Font::getDefaultTypefaceForFont (FontOptions{});
|
||||
|
||||
if (defaultTypeface == nullptr)
|
||||
{
|
||||
DBG ("Skipping test: No default typeface found!");
|
||||
return;
|
||||
}
|
||||
|
||||
String testString { text };
|
||||
|
||||
SimpleShapedText st { &testString, ShapedTextOptions{}.withMaxWidth (maxWidth) };
|
||||
SimpleShapedText st { &testString, ShapedTextOptions{}.withFont (FontOptions { defaultTypeface })
|
||||
.withMaxWidth (maxWidth) };
|
||||
|
||||
auto success = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue