C++: Add a test that fails because of a non-terminating test that dominates this one.

This commit is contained in:
Mathias Vorreiter Pedersen
2023-11-13 15:24:56 +00:00
parent dc4dda1dbc
commit bc576f658e
2 changed files with 9 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
edges
subpaths
nodes
subpaths
#select

View File

@@ -608,6 +608,13 @@ int test23() {
return sizeof(buffer) / sizeof(buffer[101]); // GOOD
}
char* strcpy(char *, const char *);
void test24(char* source) {
char buffer[100];
strcpy(buffer, source); // BAD
}
int tests_main(int argc, char *argv[])
{
long long arr17[19];
@@ -633,6 +640,7 @@ int tests_main(int argc, char *argv[])
test21(argc == 0);
test22(argc == 0, argv[0]);
test23();
test24(argv[0]);
return 0;
}