@@ -7,20 +7,23 @@ class PluginManagerTest : public testing::Test
77protected:
88 void SetUp () override
99 {
10+ File arduinoOutputDir = File::getSpecialLocation (File::currentExecutableFile).getParentDirectory ();
11+
1012#ifdef JUCE_LINUX
13+ arduinoOutputDir = arduinoOutputDir.getChildFile (" ../ArduinoOutput" );
1114 files =
12- File::getCurrentWorkingDirectory ().getChildFile (" ../ArduinoOutput" ).findChildFiles (File::findFiles, false , " ArduinoOutput.*" , File::FollowSymlinks::no);
13- #else
15+ arduinoOutputDir.findChildFiles (File::findFiles, false , " ArduinoOutput.*" , File::FollowSymlinks::no);
16+ #else
17+ arduinoOutputDir = arduinoOutputDir.getChildFile (" ../../ArduinoOutput" );
1418 files =
15- File::getCurrentWorkingDirectory (). getChildFile ( " ../../ArduinoOutput " ) .findChildFiles (File::findFiles, true , " ArduinoOutput.*" , File::FollowSymlinks::no);
19+ arduinoOutputDir .findChildFiles (File::findFiles, true , " ArduinoOutput.*" , File::FollowSymlinks::no);
1620#endif
1721
18- ASSERT_GT (files.size (), 1 ) << " Arduino Ouput plugin not found. Make sure to build the plugin tests before running the tests. " ;
22+ ASSERT_GE (files.size (), 1 ) << " Arduino Output plugin not found in " << arduinoOutputDir. getFullPathName () ;
1923
2024 String path = files[0 ].getFullPathName ();
2125
22- pluginManager.loadPlugin (path);
23-
26+ pluginManager.loadPlugin (path);
2427 }
2528
2629 PluginManager pluginManager;
@@ -44,11 +47,11 @@ Find the processor information from the Plugin Manager and verify the processor
4447*/
4548TEST_F (PluginManagerTest, PluginCreation)
4649{
47- Plugin::ProcessorInfo processorInfo = pluginManager.getProcessorInfo (0 );
50+ Plugin::ProcessorInfo processorInfo = pluginManager.getProcessorInfo (0 );
4851
49- EXPECT_EQ (String (processorInfo.name ), " Arduino Output" );
50- EXPECT_EQ (processorInfo.type , Plugin::Processor::SINK);
51- EXPECT_NE (processorInfo.creator , nullptr );
52+ EXPECT_EQ (String (processorInfo.name ), " Arduino Output" );
53+ EXPECT_EQ (processorInfo.type , Plugin::Processor::SINK);
54+ EXPECT_NE (processorInfo.creator , nullptr );
5255}
5356
5457TEST_F (PluginManagerTest, getLibraryIndexFromPlugin)
0 commit comments