<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Ticket search results</title><link>https://forge.codesys.com/lib/counit/tickets/</link><description>You searched for assigned_to:"hermsen"</description><language>en</language><lastBuildDate>Tue, 24 May 2022 22:56:28 -0000</lastBuildDate><item><title>AssertEquals_REAL does not handle NaN</title><link>https://forge.codesys.com/lib/counit/tickets/60/</link><description>## What happened.
~~~
rlExpected := 1.0 / 0.0; // results in NaN
AssertEquals_REAL(0.0, rlExpected, 0.0001, 'comparison of a valid REAL and NaN should fail');
~~~

## What I expected.

A comparison between a float value and NaN should be a fail.
Comparison between NaN, +Inf, -Inf should also be supported. If both Expected and Actual are NaN (etc) it should pass.

## What happened instead.

The test passed.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jtebokkel</dc:creator><pubDate>Tue, 24 May 2022 22:56:28 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/counit/tickets/60/</guid></item><item><title>AssertEquals_STRING fails to display Error Severity</title><link>https://forge.codesys.com/lib/counit/tickets/55/</link><description>When testing a sanitizing function I loaded a STRING(255) with a string of length 255. When that string fails to be equal I'll get the test marked as failed, but the PLC log doesn't highlight the error. (See attached screen shot)

I'd expect to have a FAILED TEST log message for that test.

I presume it is because comparing two strings of length 255 breaks the messaging system.

#### T001_Parametrize
~~~
METHOD T001_Parametrize
VAR_INPUT
	sTestName : STRING(255);
	val : STRING(255);
	expected : STRING(255);
END_VAR
VAR
	result : STRING(255);
END_VAR

TEST(sTestName);

result := TMT.Sanitize(val);

AssertEquals_STRING(expected, result, 'unexpected sanitize result');

TEST_FINISHED();
~~~


#### Method calls
~~~
T001_Parametrize('T001_Parameterize:nothing to do', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis lectus nisi, id suscipit felis porta sit amet. Sed tincidunt pharetra velit vitae molestie. Fusce auctor ornare posuere. Class aptent taciti sociosqu ad litora torquent per conubia id.', 
'/orem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mollis lectus nisi, id suscipit felis porta sit amet. Sed tincidunt pharetra velit vitae molestie. Fusce auctor ornare posuere. Class aptent taciti sociosqu ad litora torquent per conubia id.');

T001_Parametrize(sTestName:='T001_Parametrize:quote_hello', 
             '$'hello, world!$'', 
             '$'$'hello, world!$'$'x');
~~~

</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jtebokkel</dc:creator><pubDate>Sat, 08 Jan 2022 14:26:30 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/counit/tickets/55/</guid></item><item><title>Migrate project to /lib/counit</title><link>https://forge.codesys.com/lib/counit/tickets/53/</link><description>migrate project

* [x] create project
* [x] export/import webpages
* [x] import SVN</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">i-campbell</dc:creator><pubDate>Thu, 30 Sep 2021 20:23:29 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/counit/tickets/53/</guid></item><item><title>Multiple timed tests, assertions and access violations</title><link>https://forge.codesys.com/lib/counit/tickets/51/</link><description>HI all,
I've started looking at the framework for a project for which I wanted to use TDD techniques.

Using the public version 1.1.0.0, after some tests I started having AccessViolations on assertions or static variables that do not get initialized with expected init values...

What I've deduced and what it's not clear to me for timed tests (state-machine based):
* If I have too many assertions in a test this causes an access violation in the PLC (using Codesys Control Win x86). If I have a state in the test state machine with an assert that is called repeatedly on each cycle (for example because I want to check that a boolean does not get true for some cycles) at some point I get an AccessViolation exception and the PLC stops. I've found a way around to call asserts only once in case a specific condition happens. Is that true?
* For timed tests it seems from the examples that for a test suite we can have only one test case. If I use more than one test case I get strange behaviors, like tests failing for wrong reasons...
I've put static variables on each test case with the unit under test also. Always in the examples I've found that the UUT and other support variables are instead instantiated in the FB of the test suite. Which one is the correct way to do it?
* When I need to use TEST_FINISHED vs TEST_FINISHED_NAME? I get strange behaviors also here. If I name the test in only the first (init) state of the test case test machine I must then used TEST_FINISHED_NAME, but then failed assertions do not appear in the log...

Thanks in advance for the help.

Regards.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">stmos</dc:creator><pubDate>Tue, 10 Aug 2021 01:49:14 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/counit/tickets/51/</guid></item><item><title>Refactor anything "CfUnit" into "cfUnit"</title><link>https://forge.codesys.com/lib/counit/tickets/49/</link><description>#49 Refactor anything "CfUnit" into "cfUnit" 
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hermsen</dc:creator><pubDate>Mon, 09 Aug 2021 20:13:36 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/counit/tickets/49/</guid></item><item><title>Implement support for new SP16 64bits datatype assertions</title><link>https://forge.codesys.com/lib/counit/tickets/41/</link><description>This ticket serves as a placeholder to implement new SP16 64 bits datatypes assertions.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Tue, 10 Aug 2021 01:57:37 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/counit/tickets/41/</guid></item><item><title>Release v1.1.0.0</title><link>https://forge.codesys.com/lib/counit/tickets/32/</link><description>Release  v1.1.0.0</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Mon, 12 Oct 2020 19:07:22 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/counit/tickets/32/</guid></item><item><title>Documentation missing</title><link>https://forge.codesys.com/lib/counit/tickets/30/</link><description>Documentation missing for

AssertArray2dEquals_LREAL
AssertArray2dEquals_REAL
AssertArray3dEquals_LREAL
AssertArray3dEquals_REAL
AssertArrayEquals_LREAL
AssertArrayEquals_REAL

Add in Online and Offline API documentation</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">aliazzz</dc:creator><pubDate>Thu, 30 Sep 2021 20:22:56 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/counit/tickets/30/</guid></item></channel></rss>