File: pluginHost.cpp

package info (click to toggle)
giada 0.15.2%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,700 kB
  • sloc: cpp: 30,043; sh: 1,056; makefile: 422; ansic: 1
file content (34 lines) | stat: -rw-r--r-- 786 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifdef WITH_VST
#ifdef RUN_TESTS_WITH_LOCAL_FILES

// temporarily disabled due to entangled deps (WIP)
#if 0

#include "../src/core/pluginHost.h"
#include <catch.hpp>


TEST_CASE("Test PluginHost class")
{
  PluginHost ph;
  pthread_mutex_t mutex;
  pthread_mutex_init(&mutex, NULL);

  SECTION("test read & write")
  {
    REQUIRE(ph.countPlugins(PluginHost::MASTER_IN) == 0);
    REQUIRE(ph.scanDir(".") > 0);
    REQUIRE(ph.saveList("test-plugin-list.xml") == 1);
    REQUIRE(ph.loadList("test-plugin-list.xml") == 1);
    REQUIRE(ph.addPlugin(0, PluginHost::MASTER_IN, &mutex) != NULL);
    REQUIRE(ph.countPlugins(PluginHost::MASTER_IN) == 1);

    ph.freeStack(PluginHost::MASTER_IN, &mutex);
    REQUIRE(ph.countPlugins(PluginHost::MASTER_IN) == 0);
  }
}

#endif

#endif
#endif