mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Cleanup of raw nullptr checks with Ref
Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
This commit is contained in:
@@ -135,7 +135,7 @@ TEST_CASE("[NoiseTexture][SceneTree] Getter and setter") {
|
||||
noise_texture->set_noise(noise);
|
||||
CHECK(noise_texture->get_noise() == noise);
|
||||
noise_texture->set_noise(nullptr);
|
||||
CHECK(noise_texture->get_noise() == nullptr);
|
||||
CHECK(noise_texture->get_noise().is_null());
|
||||
|
||||
noise_texture->set_width(8);
|
||||
noise_texture->set_height(4);
|
||||
@@ -190,7 +190,7 @@ TEST_CASE("[NoiseTexture][SceneTree] Getter and setter") {
|
||||
noise_texture->set_color_ramp(gradient);
|
||||
CHECK(noise_texture->get_color_ramp() == gradient);
|
||||
noise_texture->set_color_ramp(nullptr);
|
||||
CHECK(noise_texture->get_color_ramp() == nullptr);
|
||||
CHECK(noise_texture->get_color_ramp().is_null());
|
||||
}
|
||||
|
||||
TEST_CASE("[NoiseTexture2D][SceneTree] Generating a basic noise texture with mipmaps and color ramp modulation") {
|
||||
|
||||
@@ -133,7 +133,7 @@ TEST_CASE("[NoiseTexture][SceneTree] Getter and setter") {
|
||||
noise_texture->set_noise(noise);
|
||||
CHECK(noise_texture->get_noise() == noise);
|
||||
noise_texture->set_noise(nullptr);
|
||||
CHECK(noise_texture->get_noise() == nullptr);
|
||||
CHECK(noise_texture->get_noise().is_null());
|
||||
|
||||
noise_texture->set_width(8);
|
||||
noise_texture->set_height(4);
|
||||
@@ -174,7 +174,7 @@ TEST_CASE("[NoiseTexture][SceneTree] Getter and setter") {
|
||||
noise_texture->set_color_ramp(gradient);
|
||||
CHECK(noise_texture->get_color_ramp() == gradient);
|
||||
noise_texture->set_color_ramp(nullptr);
|
||||
CHECK(noise_texture->get_color_ramp() == nullptr);
|
||||
CHECK(noise_texture->get_color_ramp().is_null());
|
||||
}
|
||||
|
||||
TEST_CASE("[NoiseTexture3D][SceneTree] Generating a basic noise texture with mipmaps and color ramp modulation") {
|
||||
|
||||
Reference in New Issue
Block a user