diff --git a/.gitignore b/.gitignore index 45dd360d0..996787d78 100644 --- a/.gitignore +++ b/.gitignore @@ -83,6 +83,7 @@ source/frontend/Makefile source/tests/ansi-pedantic-test_* source/tests/CarlaString source/tests/CarlaUtils +source/tests/RDF source/tests/EngineEvents source/tests/PipeServer diff --git a/source/tests/CarlaUtils.cpp b/source/tests/CarlaUtils.cpp index 7567db602..e0f89206c 100644 --- a/source/tests/CarlaUtils.cpp +++ b/source/tests/CarlaUtils.cpp @@ -27,9 +27,6 @@ #include "CarlaBackendUtils.hpp" #include "CarlaEngineUtils.hpp" -#include "ladspa_rdf.hpp" -#include "lv2_rdf.hpp" - #include "CarlaLadspaUtils.hpp" // #include "CarlaBridgeUtils.hpp" diff --git a/source/tests/Makefile b/source/tests/Makefile index c3468da77..2fd9d1e57 100644 --- a/source/tests/Makefile +++ b/source/tests/Makefile @@ -40,7 +40,7 @@ endif # -------------------------------------------------------------- TARGETS = ansi-pedantic-test_c ansi-pedantic-test_c99 -TARGETS += CarlaString CarlaUtils +TARGETS += CarlaString CarlaUtils RDF # ansi-pedantic-test_cxx ansi-pedantic-test_cxx11 # TARGETS += EngineEvents PipeServer Print RtLinkedList RtLinkedListGnu Utils @@ -71,6 +71,10 @@ CarlaUtils: CarlaUtils.cpp ../utils/*.hpp $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ valgrind --leak-check=full ./$@ +RDF: RDF.cpp ../modules/ladspa_rdf.hpp ../modules/lv2_rdf.hpp + $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ + valgrind --leak-check=full ./$@ + # -------------------------------------------------------------- ChildProcess: ChildProcess.cpp diff --git a/source/tests/RDF.cpp b/source/tests/RDF.cpp new file mode 100644 index 000000000..f603b0c8c --- /dev/null +++ b/source/tests/RDF.cpp @@ -0,0 +1,54 @@ +/* + * Carla LADSPA/LV2_RDF Tests + * Copyright (C) 2014 Filipe Coelho + * + * 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 "ladspa_rdf.hpp" +#include "lv2_rdf.hpp" + +#include "CarlaUtils.hpp" + +// ----------------------------------------------------------------------- +// main + +int main() +{ + // ladspa + { + LADSPA_RDF_ScalePoint scalePoint1, scalePoint2; + scalePoint2.Label = carla_strdup(""); + + LADSPA_RDF_Port port1, port2, port3; + port2.Label = carla_strdup(""); + port3.Label = carla_strdup(""); + port3.ScalePoints = new LADSPA_RDF_ScalePoint[2]; + port3.ScalePoints[0].Label = carla_strdup(""); + port3.ScalePoints[1].Label = carla_strdup(""); + + LADSPA_RDF_Descriptor desc1, desc2, desc3; + desc2.Title = carla_strdup(""); + desc3.Title = carla_strdup(""); + desc2.Creator = carla_strdup(""); + desc3.Creator = carla_strdup(""); + desc3.Ports = new LADSPA_RDF_Port[1]; + desc3.Ports[0].Label = carla_strdup(""); + desc3.Ports[0].ScalePoints = new LADSPA_RDF_ScalePoint[1]; + desc3.Ports[0].ScalePoints[0].Label = carla_strdup(""); + } + + return 0; +} + +// -----------------------------------------------------------------------