Skip to content

Add unit tests for AudioStreamInteractive #105490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

michelleboisvert
Copy link

Contributions to Issue #43440
Basic unit tests to verify the constructor, some getters, and some setters of the AudioStreamInteractive, AudioStreamPlaybackInteractive, AudioStreamSynchronized, and AudioStreamPlaylist class.

@michelleboisvert michelleboisvert requested review from a team as code owners April 17, 2025 13:30
@AThousandShips AThousandShips changed the title Adding unit tests for AudioStreamInteractive Add unit tests for AudioStreamInteractive Apr 17, 2025
@AThousandShips
Copy link
Member

You've still included the unrelated files and the old files under test/, please remove

@michelleboisvert
Copy link
Author

Is there a way to see what line is causing the static check to fail?

@AThousandShips
Copy link
Member

@michelleboisvert
Copy link
Author

I checked through that and noticed clang-format failed, but I wasn't able to see anything on the contributors chat on how to work it out

@AThousandShips
Copy link
Member

It says in red and green what lines to change, it's tabulation related

@michelleboisvert
Copy link
Author

would these new commits be able to be checked?

stream.instantiate();
CHECK(stream.is_valid());

//checking default values
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//checking default values
// Checking default values.

stream.instantiate();
CHECK(stream.is_valid());

//checking setting and getting clip name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//checking setting and getting clip name
// Checking setting and getting clip name.

playlist.instantiate();
CHECK(playlist.is_valid());

// checking default settings
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// checking default settings
// Checking default settings.

CHECK(playlist->is_meta_stream() == true);
CHECK(playlist->get_bpm() == 0.0);

//using some set methods
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//using some set methods
// Using some set methods.

CHECK(playlist->get_bpm() == 0.0);

//using some set methods
playlist->set_loop(false); //we want these to fail for stress testing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
playlist->set_loop(false); //we want these to fail for stress testing
playlist->set_loop(false); // we want these to fail for stress testing.

CHECK(stream->get_clip_name(0) == name);
}

TEST_CASE("[AudioStreamInteractive] test_instantiate_playback") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TEST_CASE("[AudioStreamInteractive] test_instantiate_playback") {
TEST_CASE("[AudioStreamInteractive] Instantiate playback") {

CHECK(playback.is_valid());
}

TEST_CASE("[AudioStreamPlaybackInteractive] test_playback") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TEST_CASE("[AudioStreamPlaybackInteractive] test_playback") {
TEST_CASE("[AudioStreamPlaybackInteractive] Playback") {


namespace TestAudio_stream_playlist {

TEST_CASE("[AudioStreamPlaylist] test_initialized_and_default") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TEST_CASE("[AudioStreamPlaylist] test_initialized_and_default") {
TEST_CASE("[AudioStreamPlaylist] Defaults") {

CHECK(playlist->get_shuffle() == false);
}

TEST_CASE("[AudioStreamPlaylist] test_instantiate_playback") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TEST_CASE("[AudioStreamPlaylist] test_instantiate_playback") {
TEST_CASE("[AudioStreamPlaylist] Instantiate playback") {


namespace TestAudio_stream_synchronized {

TEST_CASE("[AudioStreamSynchronized] test_initialized_and_default") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TEST_CASE("[AudioStreamSynchronized] test_initialized_and_default") {
TEST_CASE("[AudioStreamSynchronized] Defaults") {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants