Skip to content

Commit 622498f

Browse files
authored
Merge pull request #113 from sudara/juce8
Update to JUCE 8 and update dependencies
2 parents e169995 + 135d714 commit 622498f

File tree

10 files changed

+48
-240
lines changed

10 files changed

+48
-240
lines changed

.github/workflows/build_and_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
submodules: true # Get JUCE populated
106106

107107
- name: Cache the build
108-
uses: mozilla-actions/[email protected].4
108+
uses: mozilla-actions/[email protected].5
109109

110110
- name: Import Certificates (macOS)
111111
uses: apple-actions/import-codesign-certs@v3
@@ -209,7 +209,7 @@ jobs:
209209
210210
- name: Codesign with Azure Trusted Signing
211211
if: ${{ matrix.name == 'Windows' }}
212-
uses: azure/trusted-signing-action@v0.3.18
212+
uses: azure/trusted-signing-action@v0.4.0
213213
with:
214214
# The Azure Active Directory tenant (directory) ID.
215215
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}

JUCE

Submodule JUCE updated 582 files

README.md

Lines changed: 6 additions & 223 deletions
Large diffs are not rendered by default.

benchmarks/Benchmarks.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ TEST_CASE ("Boot performance")
77
BENCHMARK_ADVANCED ("Processor constructor")
88
(Catch::Benchmark::Chronometer meter)
99
{
10-
auto gui = juce::ScopedJuceInitialiser_GUI {};
1110
std::vector<Catch::Benchmark::storage_for<PluginProcessor>> storage (size_t (meter.runs()));
1211
meter.measure ([&] (int i) { storage[(size_t) i].construct(); });
1312
};
1413

1514
BENCHMARK_ADVANCED ("Processor destructor")
1615
(Catch::Benchmark::Chronometer meter)
1716
{
18-
auto gui = juce::ScopedJuceInitialiser_GUI {};
1917
std::vector<Catch::Benchmark::destructable_object<PluginProcessor>> storage (size_t (meter.runs()));
2018
for (auto& s : storage)
2119
s.construct();
@@ -25,8 +23,6 @@ TEST_CASE ("Boot performance")
2523
BENCHMARK_ADVANCED ("Editor open and close")
2624
(Catch::Benchmark::Chronometer meter)
2725
{
28-
auto gui = juce::ScopedJuceInitialiser_GUI {};
29-
3026
PluginProcessor plugin;
3127

3228
// due to complex construction logic of the editor, let's measure open/close together

benchmarks/Catch2Main.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// All test files are included in the executable via the Glob in CMakeLists.txt
2+
3+
#include "juce_gui_basics/juce_gui_basics.h"
4+
#include <catch2/catch_session.hpp>
5+
6+
int main (int argc, char* argv[])
7+
{
8+
// This lets us use JUCE's MessageManager without leaking.
9+
// PluginProcessor might need this if you use the APVTS for example.
10+
// You'll also need it for tests that rely on juce::Graphics, juce::Timer, etc.
11+
// It's nicer DX when placed here vs. manually in Catch2 SECTIONs
12+
juce::ScopedJuceInitialiser_GUI gui;
13+
14+
const int result = Catch::Session().run (argc, argv);
15+
16+
return result;
17+
}

tests/Catch2Main.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// All test files are included in the executable via the Glob in CMakeLists.txt
2+
3+
#include "juce_gui_basics/juce_gui_basics.h"
4+
#include <catch2/catch_session.hpp>
5+
6+
int main (int argc, char* argv[])
7+
{
8+
// This lets us use JUCE's MessageManager without leaking.
9+
// PluginProcessor might need this if you use the APVTS for example.
10+
// You'll also need it for tests that rely on juce::Graphics, juce::Timer, etc.
11+
// It's nicer DX when placed here vs. manually in Catch2 SECTIONs
12+
juce::ScopedJuceInitialiser_GUI gui;
13+
14+
const int result = Catch::Session().run (argc, argv);
15+
16+
return result;
17+
}
18+
#include <catch2/catch_test_macros.hpp>

tests/PluginBasics.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ TEST_CASE ("Plugin instance", "[instance]")
1212
{
1313
PluginProcessor testPlugin;
1414

15-
// This lets us use JUCE's MessageManager without leaking.
16-
// PluginProcessor might need this if you use the APVTS for example.
17-
// You'll also need it for tests that rely on juce::Graphics, juce::Timer, etc.
18-
auto gui = juce::ScopedJuceInitialiser_GUI {};
19-
2015
SECTION ("name")
2116
{
2217
CHECK_THAT (testPlugin.getName().toStdString(),

tests/helpers/test_helpers.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@
1919
});
2020
2121
*/
22-
[[maybe_unused]] void runWithinPluginEditor (const std::function<void (PluginProcessor& plugin)>& testCode)
22+
[[maybe_unused]] static void runWithinPluginEditor (const std::function<void (PluginProcessor& plugin)>& testCode)
2323
{
2424
PluginProcessor plugin;
25-
auto gui = juce::ScopedJuceInitialiser_GUI {};
26-
auto editor = plugin.createEditorIfNeeded();
25+
const auto editor = plugin.createEditorIfNeeded();
2726

2827
testCode (plugin);
2928

0 commit comments

Comments
 (0)