<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/cut/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/cut/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 27 Sep 2004 21:20:53 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/cut/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>BRINGUP and TAKEDOWN are location dependent</title><link>https://sourceforge.net/p/cut/bugs/5/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;In the file containing the test definitions, all of the&lt;br /&gt;
functions are called in the same order that they exist&lt;br /&gt;
in the file, including the bringup and takedown functions.&lt;/p&gt;
&lt;p&gt;BRINGUP should be called before any of the tests, and&lt;br /&gt;
TAKEDOWN should be called after all of the tests.&lt;/p&gt;
&lt;p&gt;Otherwise whats the point in giving the functions&lt;br /&gt;
special names?&lt;/p&gt;
&lt;p&gt;I like to have my bringup and takedown functions both&lt;br /&gt;
at the beginning of the file, because if you edit one&lt;br /&gt;
you will likely edit the other.&lt;/p&gt;
&lt;p&gt;Here is an example that will probably cause a runtime&lt;br /&gt;
error:&lt;/p&gt;
&lt;p&gt;char* pString;&lt;/p&gt;
&lt;p&gt;void __CUT_BRINGUP__TestString( void )&lt;br /&gt;
{&lt;br /&gt;
    pString = malloc(256);&lt;br /&gt;
}&lt;br /&gt;
void __CUT_TAKEDOWN__TestString( void )&lt;br /&gt;
{&lt;br /&gt;
    free(pString);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;void __CUT__TestSomeStringTest()&lt;br /&gt;
{&lt;br /&gt;
    strcpy(pString, "hello world");&lt;br /&gt;
    ASSERT( 0 == strcmp("hello world", pString), "String&lt;br /&gt;
is hello world" );&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Trevor Croft</dc:creator><pubDate>Mon, 27 Sep 2004 21:20:53 -0000</pubDate><guid isPermaLink="false">https://sourceforge.netd3e5398eb10ae0b81ea426c8725bea8dd8ba63e7</guid></item><item><title>Changes for generated code</title><link>https://sourceforge.net/p/cut/bugs/4/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Template changes for version 2.3:&lt;/p&gt;
&lt;p&gt;In &amp;amp;quot;print_integer_as_expected&amp;amp;quot;, cast fourth arg to&lt;br /&gt;
unsigned long as shown:&lt;/p&gt;
&lt;p&gt;printf( &amp;amp;quot;(signed) %d (unsigned) %u (hex) 0x%08lX&amp;amp;quot;, i,&lt;br /&gt;
i, (unsigned long) i );&lt;/p&gt;
&lt;p&gt;In &amp;amp;quot;__cut_check_errors&amp;amp;quot;, change final &amp;amp;quot;else return 1&amp;amp;quot; to&lt;br /&gt;
fall-through as shown:&lt;/p&gt;
&lt;p&gt;} ;&lt;br /&gt;
return 1;&lt;/p&gt;
&lt;p&gt;Both changes prevent warning errors from picky compilers.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Jack &amp;amp;lt;sarvela@cs.utexas.edu&amp;amp;gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Thu, 22 May 2003 17:59:48 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net652bc08a60e1850f2ea329be2c507f5be715182e</guid></item><item><title>Failed test returns exit code 0</title><link>https://sourceforge.net/p/cut/bugs/3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When a bring-up fails, a non-zero result code is&lt;br /&gt;
returned.  But, when a normal test fails, CUT's test&lt;br /&gt;
runner returns a zero result code, as if everything&lt;br /&gt;
passed.  This can confuse IDE environments and shell&lt;br /&gt;
scripts.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Fri, 14 Mar 2003 19:27:35 -0000</pubDate><guid isPermaLink="false">https://sourceforge.netfccd440ce821d674943691ebd9618a820939fe3a</guid></item><item><title>Makefile should be OS agnostic.</title><link>https://sourceforge.net/p/cut/bugs/2/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The supplied Makefile comes pre-configured with&lt;br /&gt;
-D__LINUX__ in it.  This is because there apparently is&lt;br /&gt;
no predefined compiler macro to identify whether or not&lt;br /&gt;
it's compiling under Linux.  I know there has to be&lt;br /&gt;
some kind of predefined compiler macro for this purpose.&lt;/p&gt;
&lt;p&gt;The Makefile should be OS agnostic, even if the&lt;br /&gt;
compiler macro can't be depended upon.  Suitable&lt;br /&gt;
documentation should be written to explain it if necessary.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Thu, 13 Mar 2003 00:20:39 -0000</pubDate><guid isPermaLink="false">https://sourceforge.netf9be46ec1077e4cbc223a28376b09378c3871297</guid></item><item><title>Bringup failure doesn't terminate test.</title><link>https://sourceforge.net/p/cut/bugs/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Create a unit test where the bring-up function is&lt;br /&gt;
guaranteed to fail, and which has at least one normal&lt;br /&gt;
test under it, also guaranteed to fail.  Run cutgen on&lt;br /&gt;
the unit test source, compile it, and execute it.  See&lt;br /&gt;
attached file -- it's already got the test case&lt;br /&gt;
pre-made in it.&lt;/p&gt;
&lt;p&gt;Note how the test in the bring-up, which is itself a&lt;br /&gt;
regular test, fails but does not terminate the&lt;br /&gt;
subsequent execution of the bring-up's dependent tests.&lt;br /&gt;
In other words, CUT's test runner enables the inner&lt;br /&gt;
code to execute even though it knows full well that the&lt;br /&gt;
environment hasn't been created/established&lt;br /&gt;
successfully for it.&lt;/p&gt;
&lt;p&gt;If the execution of a bring-up failed, it's likely that&lt;br /&gt;
a pointer or handle will be set to NULL, zero, or some&lt;br /&gt;
other illegal value.  The contained unit tests assume&lt;br /&gt;
that the environment is established, and therefore, do&lt;br /&gt;
not regularly check these values to ensure they're&lt;br /&gt;
correct.  As a result, executing a unit test program&lt;br /&gt;
can potentially crash in the event an environment&lt;br /&gt;
wasn't established correctly.&lt;/p&gt;
&lt;p&gt;Note also that a teardown for a failed bring-up is also&lt;br /&gt;
executed.  For the same reasons as above, it could also&lt;br /&gt;
crash the system or the process (freeing memory that&lt;br /&gt;
was never actually allocated, closing a window that was&lt;br /&gt;
never opened, etc).  Therefore, it too should not be&lt;br /&gt;
allowed to run if an environment bring-up failed.&lt;/p&gt;&lt;/div&gt;</description><pubDate>Tue, 11 Mar 2003 19:59:34 -0000</pubDate><guid isPermaLink="false">https://sourceforge.net9fe553a22e6779585bdaee985e1c4cd2663d556f</guid></item></channel></rss>