Skip to content

Commit

Permalink
Increase timeout for macOS. Refine test for ubuntu.
Browse files Browse the repository at this point in the history
  • Loading branch information
sudara committed Jun 9, 2024
1 parent 29d03e7 commit f8ed769
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
name: Tests
runs-on: ${{ matrix.os }}
timeout-minutes: 15
timeout-minutes: 20 # macos-11 in particular needs more than 15 min

strategy:
fail-fast: false # show errors for each platform vs. cancel build
Expand Down
5 changes: 4 additions & 1 deletion tests/text_shadow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@ TEST_CASE ("Melatonin Blur Text Shadow")
juce::Graphics g (result);
g.fillAll (juce::Colours::white);
g.setColour (juce::Colours::black);
g.setFont(g.getCurrentFont().withHeight(13));
g.setFont(g.getCurrentFont().withHeight(12)); // macos and windows happy with 13, ubuntu needs 12
g.drawText ("O", 0, 0, 9, 9, juce::Justification::centred, false);
}

save_test_image (result, "text_no_shadow.png");
// middle of image is white
CHECK (result.getPixelAt (4, 4).toDisplayString (true) == "FFFFFFFF");

// whole image isn't white
CHECK (isImageFilled (result, juce::Colours::white) != true);

// top middle is close to black
auto topMiddle = result.getPixelAt (4, 4);
CHECK (getPixel (result, 4, 1) != "FFFFFFFF");
Expand Down

0 comments on commit f8ed769

Please sign in to comment.