Skip to content

Fix unit tests - #4

Merged
ajvanamerongen merged 4 commits into
mainfrom
fix-tests
Aug 27, 2026
Merged

ajvanamerongen merged 4 commits into
mainfrom
fix-tests

Conversation

@csummers25

Copy link
Copy Markdown
  • Fixes the broken test caused by the JustRelax.Mask type not implementing the copy function, by adding a copy definition for this type.
  • Adds a test of this new copy function.
  • Adds a type check test for the mask_vbox fields in the Stokes object.

@github-actions

Copy link
Copy Markdown

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic main) to apply these changes.

Click here to view the suggested changes.
diff --git a/test/test_mask.jl b/test/test_mask.jl
index 4cbcc9e..5ffce59 100644
--- a/test/test_mask.jl
+++ b/test/test_mask.jl
@@ -21,7 +21,7 @@ import JustRelax.JustRelax3D as JR3
     @test all(isone, m[4:7, 4:7])
 
     # test copy
-    @test all(copy(m)[1:ni[1],1:ni[2]].== m[1:ni[1],1:ni[2]])
+    @test all(copy(m)[1:ni[1], 1:ni[2]] .== m[1:ni[1], 1:ni[2]])
 
     # test masking
     A = rand(ni...)
@@ -64,7 +64,7 @@ end
     @test all(isone, m[4:7, 4:7, 4:7])
 
     # test copy
-    @test all(copy(m)[1:ni[1],1:ni[2],1:ni[3]].== m[1:ni[1],1:ni[2],1:ni[3]])
+    @test all(copy(m)[1:ni[1], 1:ni[2], 1:ni[3]] .== m[1:ni[1], 1:ni[2], 1:ni[3]])
 
     A = rand(ni...)
     B = zeros(ni...)

@ajvanamerongen
ajvanamerongen merged commit 3b034be into main Aug 27, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants