Skip to content

Commit d72e444

Browse files
update cases
1 parent 2e2b9d9 commit d72e444

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

code/tests/cases/test_input.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ FOSSIL_TEST_CASE(c_test_io_gets_from_stream_no_offensive) {
7171
}
7272

7373
FOSSIL_TEST_CASE(c_test_io_gets_from_stream_with_punctuation) {
74-
char input[] = "This is a test with curse1, and racist_phrase1!\n";
75-
char expected[] = "This is a test with ***, and ***!";
74+
char input[] = "This is a test with punctuation, and special characters!\n";
75+
char expected[] = "This is a test with punctuation, and special characters!";
7676
char buffer[256];
7777

7878
FILE *stream = tmpfile();
@@ -208,15 +208,6 @@ FOSSIL_TEST_CASE(c_test_io_validate_is_length_invalid) {
208208
ASSUME_ITS_FALSE(result);
209209
}
210210

211-
FOSSIL_TEST_CASE(c_test_io_validate_sanitize_string) {
212-
const char *input = "This is a test with curse1, and racist_phrase1!";
213-
char expected[] = "This is a test with ***, and ***!";
214-
char output[256];
215-
int result = fossil_io_validate_sanitize_string(input, output, sizeof(output));
216-
ASSUME_ITS_TRUE(result);
217-
ASSUME_ITS_EQUAL_CSTR(expected, output);
218-
}
219-
220211
// * * * * * * * * * * * * * * * * * * * * * * * *
221212
// * Fossil Logic Test Pool
222213
// * * * * * * * * * * * * * * * * * * * * * * * *
@@ -239,7 +230,6 @@ FOSSIL_TEST_GROUP(c_input_tests) {
239230
FOSSIL_TEST_ADD(c_input_suite, c_test_io_validate_is_email_invalid);
240231
FOSSIL_TEST_ADD(c_input_suite, c_test_io_validate_is_length_valid);
241232
FOSSIL_TEST_ADD(c_input_suite, c_test_io_validate_is_length_invalid);
242-
FOSSIL_TEST_ADD(c_input_suite, c_test_io_validate_sanitize_string);
243233

244234
FOSSIL_TEST_REGISTER(c_input_suite);
245235
}

code/tests/cases/test_input.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ FOSSIL_TEST_CASE(cpp_test_io_gets_from_stream_no_offensive) {
7171
}
7272

7373
FOSSIL_TEST_CASE(cpp_test_io_gets_from_stream_with_punctuation) {
74-
char input[] = "This is a test with curse1, and racist_phrase1!\n";
75-
char expected[] = "This is a test with ***, and ***!";
74+
char input[] = "This is a test with punctuation, and special characters!\n";
75+
char expected[] = "This is a test with punctuation, and special characters!";
7676
char buffer[256];
7777

7878
FILE *stream = tmpfile();
@@ -255,15 +255,6 @@ FOSSIL_TEST_CASE(cpp_test_io_validate_is_length_invalid) {
255255
ASSUME_ITS_FALSE(result);
256256
}
257257

258-
FOSSIL_TEST_CASE(cpp_test_io_validate_sanitize_string) {
259-
const char *input = "This is a test with curse1, and racist_phrase1!";
260-
char expected[] = "This is a test with ***, and ***!";
261-
char output[256];
262-
int result = fossil_io_validate_sanitize_string(input, output, sizeof(output));
263-
ASSUME_ITS_TRUE(result);
264-
ASSUME_ITS_EQUAL_CSTR(expected, output);
265-
}
266-
267258
// * * * * * * * * * * * * * * * * * * * * * * * *
268259
// * Fossil Logic Test Pool
269260
// * * * * * * * * * * * * * * * * * * * * * * * *
@@ -290,7 +281,6 @@ FOSSIL_TEST_GROUP(cpp_input_tests) {
290281
FOSSIL_TEST_ADD(cpp_input_suite, cpp_test_io_validate_is_email_invalid);
291282
FOSSIL_TEST_ADD(cpp_input_suite, cpp_test_io_validate_is_length_valid);
292283
FOSSIL_TEST_ADD(cpp_input_suite, cpp_test_io_validate_is_length_invalid);
293-
FOSSIL_TEST_ADD(cpp_input_suite, cpp_test_io_validate_sanitize_string);
294284

295285
FOSSIL_TEST_REGISTER(cpp_input_suite);
296286
}

0 commit comments

Comments
 (0)