Skip to content

Commit 7cbca16

Browse files
Update test_cnullptr.cpp
1 parent ce1e60b commit 7cbca16

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

code/tests/cases/test_cnullptr.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ FOSSIL_TEST_CASE(cpp_test_cunwrap_option) {
118118

119119
// Uncommenting the following line will trigger panic due to unwrapping a None value
120120
// ASSUME_ITS_EQUAL_PTR(cunwrap_option(none_option), cnull); // Should panic in actual code
121+
cunused(none_option); // avoid unused error
121122
}
122123

123124
// ** Test cunwrap_or_option Macro **
@@ -126,8 +127,6 @@ FOSSIL_TEST_CASE(cpp_test_cunwrap_or_option) {
126127
COption none_option = cnone();
127128
ASSUME_ITS_EQUAL_PTR(cunwrap_or_option(some_option, reinterpret_cast<void *>(99)), reinterpret_cast<void *>(1));
128129
ASSUME_ITS_EQUAL_PTR(cunwrap_or_option(none_option, reinterpret_cast<void *>(99)), reinterpret_cast<void *>(99));
129-
130-
cunused(none_option);
131130
}
132131

133132
// ** Test cdrop Macro **

0 commit comments

Comments
 (0)