Zrythm
v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm_helper.h
1
// SPDX-FileCopyrightText: © 2019-2024 Alexandros Theodotou <alex@zrythm.org>
2
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4
#ifndef __TEST_HELPERS_ZRYTHM_H__
5
#define __TEST_HELPERS_ZRYTHM_H__
6
7
#include "zrythm-test-config.h"
8
9
/* include commonly used stuff */
10
#include "gui/backend/backend/zrythm.h"
11
#include "utils/gtest_wrapper.h"
12
13
#ifdef G_OS_UNIX
14
# include <glib-unix.h>
15
#endif
16
27
class
ZrythmFixture :
virtual
public
::testing::Test
28
{
29
public
:
30
// To be used in most tests as a fixture.
31
ZrythmFixture () : ZrythmFixture (
false
, 0, 0,
false
,
true
) { }
32
33
// To be used when more control is needed.
34
ZrythmFixture (
35
bool
optimized,
36
int
samplerate,
37
int
buf_size,
38
bool
use_pipewire,
39
bool
logging_enabled);
40
virtual
~ZrythmFixture ();
41
42
void
SetUp ()
override
;
43
void
TestBody ()
override
;
44
void
TearDown ()
override
;
45
46
private
:
47
bool
optimized_;
48
int
samplerate_;
49
int
buf_size_;
50
bool
use_pipewire_;
51
bool
logging_enabled_;
52
};
53
54
class
ZrythmFixtureWithPipewire :
public
ZrythmFixture
55
{
56
public
:
57
ZrythmFixtureWithPipewire () : ZrythmFixture (
false
, 0, 0,
true
,
true
) { }
58
};
59
60
class
ZrythmFixtureOptimized :
public
ZrythmFixture
61
{
62
public
:
63
ZrythmFixtureOptimized () : ZrythmFixture (
true
, 0, 0,
false
,
true
) { }
64
};
65
66
void
67
test_helper_zrythm_gui_init (
int
argc,
char
* argv[]);
68
void
69
test_helper_project_init_done_cb (
70
bool
success,
71
std::string error,
72
void
* user_data);
73
75
#define DEFAULT_FISHBOWL_TIME 20
76
80
81
#endif
tests
helpers
zrythm_helper.h
Generated by
1.15.0