tcunit / TcUnit

An unit testing framework for Beckhoff's TwinCAT 3
Other
258 stars 72 forks source link

Variable "NumberOfTestsToAnalyse" is limited to the wrong boundaries #187

Closed JoergWitt closed 1 year ago

JoergWitt commented 2 years ago

Describe the bug It is not possible to set the GVL variable MaxNumberOfTestSuites less than MaxNumberOfTestsForEachTestSuite. It causes compiler errors in FB_TestResults and FB_TestSuite.

The reason is the variable NumberOfTestsToAnalyse used in TcUnit. It is limited to: NumberOfTestsToAnalyse : UINT(1..GVL_Param_TcUnit.MaxNumberOfTestSuites);

The solution is as follows, if you agree my Expected behavior: NumberOfTestsToAnalyse : UINT(1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite);

Expected behavior I think, that number of test suites and number of test in each test suite are independent from each other and so I can set them independently.

Screenshots NumbreOfTestsToAnalyse

sagatowski commented 2 years ago

@JoergWitt thank you for this extremely well documented issue.

Thanks to your well documented issue it's crystal clear that this is a bug. Could you please create a pull request with the change, and then I will merge it in?

JoergWitt commented 2 years ago

Sure, will create the pull request.

sagatowski commented 1 year ago

Issue solved. Thanks @JoergWitt.