Unit testing - How to pass semicolon string to test file in DUnitX
If I have a unit test parameter with a string and I want to check if there is a comma ( ,
) in the input string, I have to create an input string with a comma in it.
But how do you pass it to TestCase?
[Test]
[TestCase('TestA', '12,34')] //AValue1 gets only '12' instead of '12,34'
[TestCase('TestB', '12,,34')] //AValue1 gets only '12' instead of '12,34'
[TestCase('TestC', '12/,34')] //AValue1 gets only '12/' instead of '12,34'
[TestCase('TestD', '12\,34')] //AValue1 gets only '12\' instead of '12,34'
procedure ValueShouldHaveComma(const AValue1: string);
+3
source to share