2023-02-08 19:12:00 +02:00
|
|
|
/* PipeWire */
|
|
|
|
/* SPDX-FileCopyrightText: Copyright © 2021 Red Hat, Inc. */
|
|
|
|
/* SPDX-License-Identifier: MIT */
|
2021-06-01 09:16:00 +03:00
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include "pwtest.h"
|
|
|
|
|
|
|
|
#include "pipewire/pipewire.h"
|
|
|
|
|
|
|
|
PWTEST(library_version)
|
|
|
|
{
|
|
|
|
const char *libversion, *headerversion;
|
|
|
|
char version_expected[64];
|
|
|
|
|
|
|
|
pw_init(0, NULL);
|
|
|
|
libversion = pw_get_library_version();
|
|
|
|
headerversion = pw_get_headers_version();
|
|
|
|
|
|
|
|
spa_scnprintf(version_expected, sizeof(version_expected),
|
|
|
|
"%d.%d.%d", PW_MAJOR, PW_MINOR, PW_MICRO);
|
|
|
|
|
|
|
|
pwtest_str_eq(headerversion, version_expected);
|
|
|
|
pwtest_str_eq(libversion, version_expected);
|
|
|
|
|
2022-02-08 12:34:08 +02:00
|
|
|
pw_deinit();
|
|
|
|
|
2021-06-01 09:16:00 +03:00
|
|
|
return PWTEST_PASS;
|
|
|
|
}
|
|
|
|
|
2022-03-26 22:20:07 +02:00
|
|
|
PWTEST(init_deinit)
|
|
|
|
{
|
|
|
|
pw_init(0, NULL);
|
|
|
|
pw_deinit();
|
|
|
|
pw_init(0, NULL);
|
|
|
|
pw_init(0, NULL);
|
|
|
|
pw_deinit();
|
|
|
|
pw_deinit();
|
|
|
|
return PWTEST_PASS;
|
|
|
|
}
|
|
|
|
|
2021-06-01 09:16:00 +03:00
|
|
|
PWTEST_SUITE(properties)
|
|
|
|
{
|
|
|
|
pwtest_add(library_version, PWTEST_NOARG);
|
2022-03-26 22:20:07 +02:00
|
|
|
pwtest_add(init_deinit, PWTEST_NOARG);
|
2021-06-01 09:16:00 +03:00
|
|
|
|
|
|
|
return PWTEST_PASS;
|
|
|
|
}
|