-
-
Notifications
You must be signed in to change notification settings - Fork 22.4k
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
base: master
Are you sure you want to change the base?
Conversation
AudioStreamInteractive
You've still included the unrelated files and the old files under |
Is there a way to see what line is causing the static check to fail? |
Yes click the failed CI, or this link https://github.com/godotengine/godot/actions/runs/14520079222/job/40738681232?pr=105490 |
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 |
It says in red and green what lines to change, it's tabulation related |
would these new commits be able to be checked? |
stream.instantiate(); | ||
CHECK(stream.is_valid()); | ||
|
||
//checking default values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//checking default values | |
// Checking default values. |
stream.instantiate(); | ||
CHECK(stream.is_valid()); | ||
|
||
//checking setting and getting clip name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//checking setting and getting clip name | |
// Checking setting and getting clip name. |
playlist.instantiate(); | ||
CHECK(playlist.is_valid()); | ||
|
||
// checking default settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// checking default settings | |
// Checking default settings. |
CHECK(playlist->is_meta_stream() == true); | ||
CHECK(playlist->get_bpm() == 0.0); | ||
|
||
//using some set methods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST_CASE("[AudioStreamInteractive] test_instantiate_playback") { | |
TEST_CASE("[AudioStreamInteractive] Instantiate playback") { |
CHECK(playback.is_valid()); | ||
} | ||
|
||
TEST_CASE("[AudioStreamPlaybackInteractive] test_playback") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST_CASE("[AudioStreamPlaybackInteractive] test_playback") { | |
TEST_CASE("[AudioStreamPlaybackInteractive] Playback") { |
|
||
namespace TestAudio_stream_playlist { | ||
|
||
TEST_CASE("[AudioStreamPlaylist] test_initialized_and_default") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST_CASE("[AudioStreamPlaylist] test_initialized_and_default") { | |
TEST_CASE("[AudioStreamPlaylist] Defaults") { |
CHECK(playlist->get_shuffle() == false); | ||
} | ||
|
||
TEST_CASE("[AudioStreamPlaylist] test_instantiate_playback") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST_CASE("[AudioStreamPlaylist] test_instantiate_playback") { | |
TEST_CASE("[AudioStreamPlaylist] Instantiate playback") { |
|
||
namespace TestAudio_stream_synchronized { | ||
|
||
TEST_CASE("[AudioStreamSynchronized] test_initialized_and_default") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEST_CASE("[AudioStreamSynchronized] test_initialized_and_default") { | |
TEST_CASE("[AudioStreamSynchronized] Defaults") { |
Contributions to Issue #43440
Basic unit tests to verify the constructor, some getters, and some setters of the AudioStreamInteractive, AudioStreamPlaybackInteractive, AudioStreamSynchronized, and AudioStreamPlaylist class.