@@ -7,20 +7,23 @@ class PluginManagerTest : public testing::Test
7
7
protected:
8
8
void SetUp () override
9
9
{
10
+ File arduinoOutputDir = File::getSpecialLocation (File::currentExecutableFile).getParentDirectory ();
11
+
10
12
#ifdef JUCE_LINUX
13
+ arduinoOutputDir = arduinoOutputDir.getChildFile (" ../ArduinoOutput" );
11
14
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" );
14
18
files =
15
- File::getCurrentWorkingDirectory (). getChildFile ( " ../../ArduinoOutput " ) .findChildFiles (File::findFiles, true , " ArduinoOutput.*" , File::FollowSymlinks::no);
19
+ arduinoOutputDir .findChildFiles (File::findFiles, true , " ArduinoOutput.*" , File::FollowSymlinks::no);
16
20
#endif
17
21
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 () ;
19
23
20
24
String path = files[0 ].getFullPathName ();
21
25
22
- pluginManager.loadPlugin (path);
23
-
26
+ pluginManager.loadPlugin (path);
24
27
}
25
28
26
29
PluginManager pluginManager;
@@ -44,11 +47,11 @@ Find the processor information from the Plugin Manager and verify the processor
44
47
*/
45
48
TEST_F (PluginManagerTest, PluginCreation)
46
49
{
47
- Plugin::ProcessorInfo processorInfo = pluginManager.getProcessorInfo (0 );
50
+ Plugin::ProcessorInfo processorInfo = pluginManager.getProcessorInfo (0 );
48
51
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 );
52
55
}
53
56
54
57
TEST_F (PluginManagerTest, getLibraryIndexFromPlugin)
0 commit comments