We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66f1611 commit 851611aCopy full SHA for 851611a
code/tests/cases/test_tree.cpp
@@ -105,7 +105,8 @@ FOSSIL_TEST(cpp_test_tree_insert_null_tree_or_value) {
105
}
106
try {
107
fossil::tofu::Tree tree("i32");
108
- tree.insert(*(static_cast<fossil::tofu::Tofu*>(nullptr)));
+ fossil::tofu::Tofu* null_value = nullptr;
109
+ tree.insert(*null_value); // This will still dereference, but is explicit and matches intent
110
ASSUME_ITS_FALSE("Expected exception for null value");
111
} catch (...) {
112
ASSUME_ITS_TRUE(true);
0 commit comments