Debian Codegraph @

ags/test/audio/fx/ags_fx_sf2_synth_recycling_test.c

raw symbols SCIP
1 /* GSequencer - Advanced GTK Sequencer
2 * Copyright (C) 2005-2022 Joël Krähemann
3 *
4 * This file is part of GSequencer.
5 *
6 * GSequencer is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * GSequencer is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GSequencer. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <glib.h>
21 #include <glib-object.h>
22
23 #include <CUnit/CUnit.h>
24 #include <CUnit/Automated.h>
25 #include <CUnit/Basic.h>
26
27 #include <ags/libags.h>
28 #include <ags/libags-audio.h>
29
30 #include <math.h>
31
32 int ags_fx_sf2_synth_recycling_test_init_suite();
33 int ags_fx_sf2_synth_recycling_test_clean_suite();
34
35 void ags_fx_sf2_synth_recycling_test_new();
36
37 /* The suite initialization function.
38 * Opens the temporary file used by the tests.
39 * Returns zero on success, non-zero otherwise.
40 */
41 int
42 ags_fx_sf2_synth_recycling_test_init_suite()
43 {
44 return(0);
45 }
46
47 /* The suite cleanup function.
48 * Closes the temporary file used by the tests.
49 * Returns zero on success, non-zero otherwise.
50 */
51 int
52 ags_fx_sf2_synth_recycling_test_clean_suite()
53 {
54 return(0);
55 }
56
57 void
58 ags_fx_sf2_synth_recycling_test_new()
59 {
60 AgsRecycling *recycling;
61 AgsFxSF2SynthRecycling *fx_sf2_synth_recycling;
62
63 recycling = g_object_new(AGS_TYPE_RECYCLING,
64 NULL);
65
66 fx_sf2_synth_recycling = ags_fx_sf2_synth_recycling_new(recycling);
67
68 CU_ASSERT(fx_sf2_synth_recycling != NULL);
69 CU_ASSERT(AGS_RECALL_RECYCLING(fx_sf2_synth_recycling)->source == recycling);
70 }
71
72 int
73 main(int argc, char **argv)
74 {
75 CU_pSuite pSuite = NULL;
76
77 putenv("LC_ALL=C");
78 putenv("LANG=C");
79
80 putenv("LADSPA_PATH=\"\"");
81 putenv("DSSI_PATH=\"\"");
82 putenv("LV2_PATH=\"\"");
83 putenv("VST3_PATH=\"\"");
84
85 /* initialize the CUnit test registry */
86 if(CUE_SUCCESS != CU_initialize_registry()){
87 return CU_get_error();
88 }
89
90 /* add a suite to the registry */
91 pSuite = CU_add_suite("AgsFxSF2SynthRecyclingTest", ags_fx_sf2_synth_recycling_test_init_suite, ags_fx_sf2_synth_recycling_test_clean_suite);
92
93 if(pSuite == NULL){
94 CU_cleanup_registry();
95
96 return CU_get_error();
97 }
98
99 /* add the tests to the suite */
100 if((CU_add_test(pSuite, "test of AgsFxSF2SynthRecycling new", ags_fx_sf2_synth_recycling_test_new) == NULL)){
101 CU_cleanup_registry();
102
103 return CU_get_error();
104 }
105
106 /* Run all tests using the CUnit Basic interface */
107 CU_basic_set_mode(CU_BRM_VERBOSE);
108 CU_basic_run_tests();
109
110 CU_cleanup_registry();
111
112 return(CU_get_error());
113 }