Skip to content

Commit f1f1e7b

Browse files
author
Johannes Markert
committed
Added test evals.
1 parent 6e4e726 commit f1f1e7b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/test_forestwrapper.jl

+8
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,29 @@
99
@test status == 0
1010
end
1111

12+
@test length(T8code.T8CODE_OBJECT_TRACKER) == 0
13+
1214
# Create a forest and wrap by `ForestWrapper`
1315
scheme = t8_scheme_new_default_cxx()
1416
cmesh = t8_cmesh_new_hypercube(T8_ECLASS_QUAD, comm, 0, 0, 0)
1517
forest = t8_forest_new_uniform(cmesh, scheme, 0, 0, comm)
1618
wrapper_A = T8code.ForestWrapper(forest)
1719

20+
@test length(T8code.T8CODE_OBJECT_TRACKER) == 1
21+
1822
# Create another forest and wrap by `ForestWrapper`
1923
scheme = t8_scheme_new_default_cxx()
2024
cmesh = t8_cmesh_new_hypercube(T8_ECLASS_TRIANGLE, comm, 0, 0, 0)
2125
forest = t8_forest_new_uniform(cmesh, scheme, 0, 0, comm)
2226
wrapper_B = T8code.ForestWrapper(forest)
2327

28+
@test length(T8code.T8CODE_OBJECT_TRACKER) == 2
29+
2430
# Finalize the first wrapper.
2531
finalize(wrapper_A)
2632

33+
@test length(T8code.T8CODE_OBJECT_TRACKER) == 1
34+
2735
# The second wrapper should be finalized automatically when Julia shuts down.
2836
# ... finalize(wrapper_B) ...
2937
end

0 commit comments

Comments
 (0)