Browse Source

Start some rewire tests

tags/1.9.4
falkTX 10 years ago
parent
commit
f331f291ff
3 changed files with 82 additions and 0 deletions
  1. +11
    -0
      source/tests/Makefile
  2. +20
    -0
      source/tests/Rewire-src.c
  3. +51
    -0
      source/tests/Rewire.cpp

+ 11
- 0
source/tests/Makefile View File

@@ -95,6 +95,17 @@ Utils: Utils.cpp ../utils/*.hpp

# --------------------------------------------------------------

Rewire.exe: Rewire-src.c.o Rewire.cpp.o
$(CXX) $^ -lversion -o $@

Rewire-src.c.o: Rewire-src.c
$(CC) $< -Wall -Wextra -DDEBUG -O0 -g -I../includes -c -o $@

Rewire.cpp.o: Rewire.cpp
$(CXX) $< -Wall -Wextra -DREAL_BUILD -DDEBUG -O0 -g -I../includes -I../utils -c -o $@

# --------------------------------------------------------------

../modules/%.a:
$(MAKE) -C ../modules $*



+ 20
- 0
source/tests/Rewire-src.c View File

@@ -0,0 +1,20 @@
/*
* Carla Tests
* Copyright (C) 2014 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the doc/GPL.txt file.
*/

#include "rewire/ReWire.c"
#include "rewire/ReWireAPI.c"
#include "rewire/ReWirePanelAPI.c"

+ 51
- 0
source/tests/Rewire.cpp View File

@@ -0,0 +1,51 @@
/*
* Carla Tests
* Copyright (C) 2014 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the doc/GPL.txt file.
*/

#include "CarlaUtils.hpp"

#include "rewire/ReWirePanelAPI.h"

int main(/*int argc, char* argv[]*/)
{
ReWire::ReWireError result;

result = ReWire::RWPOpen();

if (result == ReWire::kReWireError_NoError)
{
carla_stdout("opened ok");
}
else
{
carla_stdout("opened failed");
return 1;
}

result = ReWire::RWPClose();

if (result == ReWire::kReWireError_NoError)
{
carla_stdout("closed ok");
}
else
{
carla_stdout("closed failed");
return 1;
}

return 0;
}

Loading…
Cancel
Save