Yes, software, and specifically C# unit tests in my case.
Positive unit tests check if the code works as expected when given valid inputs. They confirm that the function or module behaves correctly under normal conditions.
Negative unit tests check how the code handles invalid or unexpected inputs. They ensure that errors are properly caught, exceptions are handled, and the system doesn’t break when things go wrong.
As for examples, it’s just the LLMs I have tried never wrote negative tests that actually worked. If you use Visual Studio, you’re probably familiar with those check marks that it has on unit tests. Those become green check marks when the test is valid, red X when it is invalid (isn’t correct). The negative tests from LLMs always have red X’s. Hope this makes sense.
I assume we’re talking about software testing? I’d like to know more about:
The meaning of negative and positive tests in this context
Good examples of badly done negative tests by LLMs
Yes, software, and specifically C# unit tests in my case. Positive unit tests check if the code works as expected when given valid inputs. They confirm that the function or module behaves correctly under normal conditions. Negative unit tests check how the code handles invalid or unexpected inputs. They ensure that errors are properly caught, exceptions are handled, and the system doesn’t break when things go wrong.
As for examples, it’s just the LLMs I have tried never wrote negative tests that actually worked. If you use Visual Studio, you’re probably familiar with those check marks that it has on unit tests. Those become green check marks when the test is valid, red X when it is invalid (isn’t correct). The negative tests from LLMs always have red X’s. Hope this makes sense.