Skip to content

Commit 851611a

Browse files
this time
1 parent 66f1611 commit 851611a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

code/tests/cases/test_tree.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ FOSSIL_TEST(cpp_test_tree_insert_null_tree_or_value) {
105105
}
106106
try {
107107
fossil::tofu::Tree tree("i32");
108-
tree.insert(*(static_cast<fossil::tofu::Tofu*>(nullptr)));
108+
fossil::tofu::Tofu* null_value = nullptr;
109+
tree.insert(*null_value); // This will still dereference, but is explicit and matches intent
109110
ASSUME_ITS_FALSE("Expected exception for null value");
110111
} catch (...) {
111112
ASSUME_ITS_TRUE(true);

0 commit comments

Comments
 (0)