Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wireplumber
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
wireplumber
Commits
bd9ae98c
Commit
bd9ae98c
authored
4 years ago
by
George Kiagiadakis
Browse files
Options
Downloads
Patches
Plain Diff
tests/si-softdsp-endpoint: fix the tests to reflect the latest changes
parent
015d61cc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/modules/si-audio-softdsp-endpoint.c
+3
-21
3 additions, 21 deletions
tests/modules/si-audio-softdsp-endpoint.c
with
3 additions
and
21 deletions
tests/modules/si-audio-softdsp-endpoint.c
+
3
−
21
View file @
bd9ae98c
...
...
@@ -12,14 +12,6 @@ typedef struct {
WpBaseTestFixture
base
;
}
TestFixture
;
typedef
struct
{
const
gchar
*
factory
;
const
gchar
*
name
;
const
gchar
*
media_class
;
const
gchar
*
expected_media_class
;
WpDirection
expected_direction
;
}
TestData
;
static
void
test_si_audio_softdsp_endpoint_setup
(
TestFixture
*
f
,
gconstpointer
user_data
)
{
...
...
@@ -103,9 +95,6 @@ test_si_audio_softdsp_endpoint_configure_activate (TestFixture * f,
wp_session_item_configure
(
adapter
,
g_variant_builder_end
(
&
b
)));
}
g_assert_cmphex
(
wp_session_item_get_flags
(
adapter
),
==
,
WP_SI_FLAG_CONFIGURED
);
{
g_autoptr
(
GVariant
)
v
=
wp_session_item_get_configuration
(
adapter
);
guint64
node_i
;
...
...
@@ -139,8 +128,6 @@ test_si_audio_softdsp_endpoint_configure_activate (TestFixture * f,
G_VARIANT_BUILDER_INIT
(
G_VARIANT_TYPE_VARDICT
);
g_variant_builder_add
(
&
b
,
"{sv}"
,
"adapter"
,
g_variant_new_uint64
((
guint64
)
adapter
));
g_variant_builder_add
(
&
b
,
"{sv}"
,
"num-streams"
,
g_variant_new_uint32
(
4
));
g_assert_true
(
wp_session_item_configure
(
endpoint
,
g_variant_builder_end
(
&
b
)));
}
...
...
@@ -151,12 +138,9 @@ test_si_audio_softdsp_endpoint_configure_activate (TestFixture * f,
{
g_autoptr
(
GVariant
)
v
=
wp_session_item_get_configuration
(
endpoint
);
guint64
adapter_i
;
guint32
ns
;
g_assert_nonnull
(
v
);
g_assert_true
(
g_variant_lookup
(
v
,
"adapter"
,
"t"
,
&
adapter_i
));
g_assert_cmpuint
(
adapter_i
,
==
,
(
guint64
)
adapter
);
g_assert_true
(
g_variant_lookup
(
v
,
"num-streams"
,
"u"
,
&
ns
));
g_assert_cmpuint
(
ns
,
==
,
4
);
}
/* activate audio softdsp endpoint */
...
...
@@ -168,6 +152,8 @@ test_si_audio_softdsp_endpoint_configure_activate (TestFixture * f,
g_assert_cmphex
(
wp_session_item_get_flags
(
endpoint
),
==
,
WP_SI_FLAG_CONFIGURED
|
WP_SI_FLAG_ACTIVE
);
g_assert_cmphex
(
wp_session_item_get_flags
(
adapter
),
==
,
WP_SI_FLAG_CONFIGURED
|
WP_SI_FLAG_ACTIVE
);
/* deactivate - configuration should not be altered */
...
...
@@ -175,16 +161,14 @@ test_si_audio_softdsp_endpoint_configure_activate (TestFixture * f,
g_assert_cmphex
(
wp_session_item_get_flags
(
endpoint
),
==
,
WP_SI_FLAG_CONFIGURED
);
g_assert_cmphex
(
wp_session_item_get_flags
(
adapter
),
==
,
0
);
{
g_autoptr
(
GVariant
)
v
=
wp_session_item_get_configuration
(
endpoint
);
guint64
adapter_i
;
guint32
ns
;
g_assert_nonnull
(
v
);
g_assert_true
(
g_variant_lookup
(
v
,
"adapter"
,
"t"
,
&
adapter_i
));
g_assert_cmpuint
(
adapter_i
,
==
,
(
guint64
)
adapter
);
g_assert_true
(
g_variant_lookup
(
v
,
"num-streams"
,
"u"
,
&
ns
));
g_assert_cmpuint
(
ns
,
==
,
4
);
}
}
...
...
@@ -251,8 +235,6 @@ test_si_audio_softdsp_endpoint_export (TestFixture * f, gconstpointer user_data)
G_VARIANT_BUILDER_INIT
(
G_VARIANT_TYPE_VARDICT
);
g_variant_builder_add
(
&
b
,
"{sv}"
,
"adapter"
,
g_variant_new_uint64
((
guint64
)
adapter
));
g_variant_builder_add
(
&
b
,
"{sv}"
,
"num-streams"
,
g_variant_new_uint32
(
4
));
g_assert_true
(
wp_session_item_configure
(
item
,
g_variant_builder_end
(
&
b
)));
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment