Skip to content

Commit ffcc53c

Browse files
this time
1 parent d4fca33 commit ffcc53c

File tree

2 files changed

+0
-89
lines changed

2 files changed

+0
-89
lines changed

code/tests/cases/test_bitwise.c

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -187,50 +187,6 @@ FOSSIL_TEST(c_test_bitwise_has) {
187187
ASSUME_ITS_TRUE(fossil_sys_bitwise_has(mask, 0x4)); // bit 2 set
188188
}
189189

190-
191-
// ** Edge cases for fossil_sys_bitwise_parse **
192-
FOSSIL_TEST(c_test_bitwise_parse_edge_cases) {
193-
fossil_sys_bitwise_entry_t entries[] = {
194-
{"read", 0x1},
195-
{"write", 0x2},
196-
{"execute", 0x4},
197-
{NULL, 0}
198-
};
199-
const fossil_sys_bitwise_table_t table = {entries, sizeof(entries) / sizeof(entries[0]) - 1};
200-
201-
// Unknown name
202-
uint64_t result = fossil_sys_bitwise_parse("unknown", &table);
203-
ASSUME_ITS_EQUAL_I32(result, 0x0);
204-
205-
// Mixed known and unknown
206-
result = fossil_sys_bitwise_parse("read|unknown|write", &table);
207-
ASSUME_ITS_EQUAL_I32(result, 0x3);
208-
209-
// Leading/trailing delimiters
210-
result = fossil_sys_bitwise_parse("|read|write|", &table);
211-
ASSUME_ITS_EQUAL_I32(result, 0x3);
212-
213-
// Duplicate names
214-
result = fossil_sys_bitwise_parse("read|read|write", &table);
215-
ASSUME_ITS_EQUAL_I32(result, 0x3);
216-
217-
// Spaces in names (should not match)
218-
result = fossil_sys_bitwise_parse(" read | write ", &table);
219-
ASSUME_ITS_EQUAL_I32(result, 0x0);
220-
221-
// NULL string
222-
result = fossil_sys_bitwise_parse(NULL, &table);
223-
ASSUME_ITS_EQUAL_I32(result, 0x0);
224-
225-
// Only delimiters
226-
result = fossil_sys_bitwise_parse("|||", &table);
227-
ASSUME_ITS_EQUAL_I32(result, 0x0);
228-
229-
// Large input string
230-
result = fossil_sys_bitwise_parse("read|write|execute|read|write|execute", &table);
231-
ASSUME_ITS_EQUAL_I32(result, 0x7);
232-
}
233-
234190
// * * * * * * * * * * * * * * * * * * * * * * * *
235191
// * Fossil Logic Test Pool
236192
// * * * * * * * * * * * * * * * * * * * * * * * *
@@ -243,7 +199,6 @@ FOSSIL_TEST_GROUP(c_bitwise_tests) {
243199
FOSSIL_TEST_ADD(c_bitwise_suite, c_test_bitwise_name);
244200
FOSSIL_TEST_ADD(c_bitwise_suite, c_test_bitwise_count);
245201
FOSSIL_TEST_ADD(c_bitwise_suite, c_test_bitwise_has);
246-
FOSSIL_TEST_ADD(c_bitwise_suite, c_test_bitwise_parse_edge_cases);
247202

248203
FOSSIL_TEST_REGISTER(c_bitwise_suite);
249204
}

code/tests/cases/test_bitwise.cpp

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -199,49 +199,6 @@ FOSSIL_TEST(cpp_test_class_bitwise_format_string) {
199199
ASSUME_ITS_EQUAL_CSTR(result.c_str(), "");
200200
}
201201

202-
// ** Edge case tests for fossil::sys::Bitwise::parse Function **
203-
FOSSIL_TEST(cpp_test_class_bitwise_parse_edge_cases) {
204-
fossil_sys_bitwise_entry_t entries[] = {
205-
{"read", 0x1},
206-
{"write", 0x2},
207-
{"execute", 0x4},
208-
{nullptr, 0}
209-
};
210-
fossil_sys_bitwise_table_t table = {entries, sizeof(entries) / sizeof(entries[0]) - 1};
211-
212-
// Unknown name in input
213-
uint64_t result = fossil::sys::Bitwise::parse("read|unknown", &table);
214-
ASSUME_ITS_EQUAL_I32(result, 0x1); // Only "read" is valid
215-
216-
// Duplicate names
217-
result = fossil::sys::Bitwise::parse("read|read|write", &table);
218-
ASSUME_ITS_EQUAL_I32(result, 0x3); // Duplicates should not affect result
219-
220-
// Leading/trailing delimiters
221-
result = fossil::sys::Bitwise::parse("|read|write|", &table);
222-
ASSUME_ITS_EQUAL_I32(result, 0x3);
223-
224-
// Spaces in input
225-
result = fossil::sys::Bitwise::parse(" read | write ", &table);
226-
ASSUME_ITS_EQUAL_I32(result, 0x3);
227-
228-
// All valid names
229-
result = fossil::sys::Bitwise::parse("read|write|execute", &table);
230-
ASSUME_ITS_EQUAL_I32(result, 0x7);
231-
232-
// Only delimiters
233-
result = fossil::sys::Bitwise::parse("|||", &table);
234-
ASSUME_ITS_EQUAL_I32(result, 0x0);
235-
236-
// Null table pointer
237-
result = fossil::sys::Bitwise::parse("read|write", nullptr);
238-
ASSUME_ITS_EQUAL_I32(result, 0x0);
239-
240-
// Null string pointer
241-
result = fossil::sys::Bitwise::parse(nullptr, &table);
242-
ASSUME_ITS_EQUAL_I32(result, 0x0);
243-
}
244-
245202
// * * * * * * * * * * * * * * * * * * * * * * * *
246203
// * Fossil Logic Test Pool
247204
// * * * * * * * * * * * * * * * * * * * * * * * *
@@ -255,7 +212,6 @@ FOSSIL_TEST_GROUP(cpp_bitwise_tests) {
255212
FOSSIL_TEST_ADD(cpp_bitwise_suite, cpp_test_class_bitwise_count);
256213
FOSSIL_TEST_ADD(cpp_bitwise_suite, cpp_test_class_bitwise_has);
257214
FOSSIL_TEST_ADD(cpp_bitwise_suite, cpp_test_class_bitwise_format_string);
258-
FOSSIL_TEST_ADD(cpp_bitwise_suite, cpp_test_class_bitwise_parse_edge_cases);
259215

260216
FOSSIL_TEST_REGISTER(cpp_bitwise_suite);
261217
}

0 commit comments

Comments
 (0)