summaryrefslogtreecommitdiffstats
path: root/modules/noise
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-09-03 16:13:55 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-09-03 16:13:55 +0200
commitd15de6f264bc3659310c19bc402a432e2ea896e3 (patch)
treedeb293154752257941ca8852de4eec167ff9d3b7 /modules/noise
parentb104f218410669ec81ec9ffd4d8833b8aa30a554 (diff)
parent194bdde94787227e8f53a4e3273c192ab70b03ac (diff)
downloadredot-engine-d15de6f264bc3659310c19bc402a432e2ea896e3.tar.gz
Merge pull request #96292 from AThousandShips/null_check_ref_fix
Cleanup of raw `nullptr` checks with `Ref`
Diffstat (limited to 'modules/noise')
-rw-r--r--modules/noise/tests/test_noise_texture_2d.h4
-rw-r--r--modules/noise/tests/test_noise_texture_3d.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/noise/tests/test_noise_texture_2d.h b/modules/noise/tests/test_noise_texture_2d.h
index 938e8fd6ab..0d18d66e74 100644
--- a/modules/noise/tests/test_noise_texture_2d.h
+++ b/modules/noise/tests/test_noise_texture_2d.h
@@ -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") {
diff --git a/modules/noise/tests/test_noise_texture_3d.h b/modules/noise/tests/test_noise_texture_3d.h
index b708eac43b..434cd20a08 100644
--- a/modules/noise/tests/test_noise_texture_3d.h
+++ b/modules/noise/tests/test_noise_texture_3d.h
@@ -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") {