0

I need to pass a set of floating point values to a Delphi DUNITX testcase . The solution with adding the separator char does not work for me.

Test_Int has the complete string and I can extract the stored integer values, the separator char as optional param does not have any function acc. to my trials.

This is opposite to solution from send 1 floating point number and therefore I fail with transferring the string with multiple real values.

    [Test]
    [TestCase('Test_Int', '1,2,3,4,5,6', ';')]
    procedure Test_Integer(const AValue1: String);


    [Test]
    [TestCase('Test_Floata', '1.5;2.4;3.4;5.6;7.0;8.0', ';')]
    [TestCase('Test_Floatb', '1,5;2,4;3,4;5,6;7,0;8,0', ';')]
    procedure Test_Floating(const AValue1: String);



procedure Test.Test_Floating(const AValue1: String);
begin
       xxxx:=AVlaue   // only get first  number :-( 
end;
Franz
  • 1,883
  • 26
  • 47

1 Answers1

0

The separator is there to separate parameters for the test method. As you have only one string parameter in Test_Floating, there should no separator appear in the value list.

[Test]
[TestCase('Test_Floata', '1.5;2.4;3.4;5.6;7.0;8.0', '|')]
[TestCase('Test_Floatb', '1,5;2,4;3,4;5,6;7,0;8,0', '|')]
procedure Test_Floating(const AValue1: String);
Uwe Raabe
  • 45,288
  • 3
  • 82
  • 130