Skip to content

Commit

Permalink
misc: add test on subtyping
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaDve committed Dec 18, 2023
1 parent 3624acc commit b44b0a5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1220,3 +1220,18 @@ pub type PlaylistId = OwnedObjectPath;
/// URIs should be sent as (UTF-8) strings. Local files should use the
/// "file://" schema.
pub type Uri = String;

#[cfg(test)]
mod tests {
use static_assertions::assert_trait_sub_all;

use super::*;

assert_trait_sub_all!(PlayerInterface: RootInterface);
assert_trait_sub_all!(TrackListInterface: PlayerInterface, RootInterface);
assert_trait_sub_all!(PlaylistsInterface: PlayerInterface, RootInterface);

assert_trait_sub_all!(LocalPlayerInterface: LocalRootInterface);
assert_trait_sub_all!(LocalTrackListInterface: LocalPlayerInterface, LocalRootInterface);
assert_trait_sub_all!(LocalPlaylistsInterface: LocalPlayerInterface, LocalRootInterface);
}

0 comments on commit b44b0a5

Please sign in to comment.